Q&A for professional and enthusiast programmers
select datefromparts(year(d.CreationDate), month(d.CreationDate), day(d.CreationDate)), count(p.Id) as [Open], count(d.Id) as [All] from PostsWithDeleted d left join Posts p on p.Id = d.Id and p.ClosedDate is null group by year(d.CreationDate), month(d.CreationDate), day(d.CreationDate) order by year(d.CreationDate), month(d.CreationDate), day(d.CreationDate)