People, like adding the query below as a subquery.
Query with WITH:
WITH dias AS(
SELECT CAST('2017-06-26' AS DATE) AS dia
UNION ALL
SELECT DATEADD(DAY, 1, d.dia)
FROM dias d
WHERE d.dia < '2017-06-30'
)
SELECT CONVERT(VARCHAR, d.dia, 103) AS data_cancelado,
COUNT(s.solid) AS cancelados
FROM dias d
LEFT JOIN solicitacao s ON CONVERT(DATE, s.soldatafechamento, 103) = d.dia
AND s.proid = 4
AND s.solestagioid = 110
GROUP BY d.dia
OPTION (MAXRECURSION 0);
Another query, where this is to put the query from above, because another column with the above query will be generated.
select
CONVERT(DATE,S.SolData,103) [DATA],
COUNT (S.SolID) [Abertos]
from Solicitacao S
where S.ProID = 4 and S.SolData between '26-06-2017' and '30-06-2017' and S.SolTipID = 35
GROUP BY CONVERT(DATE,S.SolData,103)
It's to come out this way
Data Abertos Cancelados
26-06-2017 0 2
27-06-2017 2 1
28-06-2017 5 0
29-06-2017 4 0
30-06-2017 0 4