select DATEADD(DAY, DATEDIFF(DAY, 0, creationdate), 0) da...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select DATEADD(DAY, DATEDIFF(DAY, 0, creationdate), 0) date, 
  sum(case when tags like '%tsql%'
             or tags like '%sql-server%' then 1 else 0 end) sql_server
from posts 
where creationdate < '2020-02-01 00:00:00'
and postTypeID = 1 -- this is for excluding answers, but it's actually not needed here because answers don't have tags, 
                   -- and they get filtered out in the select statement
group by DATEADD(DAY, DATEDIFF(DAY, 0, creationdate), 0)
order by 1 desc

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results