I have a query from the period from 26 to 30-06 which brings the following result:
Data_Cancelado Cancelados
27-06-2017 4
29-06-2017 5
However, I want it to come this way, that is, I want it to come to the query every day regardless of whether or not it is registered.
Data_Cancelado Cancelados
26-06-2017 0
27-06-2017 4
28-06-2017 0
29-06-2017 5
30-06-2017 0
The query is as follows:
select
CONVERT(DATE,S.SolDataFechamento,103) [DATA_Cancelado],
COUNT (S.SolID) [Cancelados]
from Solicitacao S
where S.ProID = 4 and S.SolEstagioID = 110 and S.SolDataFechamento BETWEEN '26-06-2017' AND '30-06-2017'
group by CONVERT(DATE,S.SolDataFechamento,103)