select DATEADD(DAY, DATEDIFF(DAY, 0, creationdate), 0) date

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
    , 'HTML/CSS' programming_language
    , count(*) question_count
    , sum(viewcount) sum_viewcount
    , max(datediff(hour, creationdate, '2020-08-09 05:49:23')) hours_count
    , sum(viewcount/(datediff(hour, creationdate, '2020-08-09 05:49:23') / 24.0)) avg_viewcount
  from posts
  where posttypeid = 1
  and creationdate < '2020-08-01' 
  and creationdate >= '2010-01-01'
  and ( tags like '%html%'
          or tags like '%css%') 
  group by DATEADD(DAY, DATEDIFF(DAY, 0, creationdate), 0)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results