Trend of "thank" comments posted for the last [period] under [post type]

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
  datefromparts(
    datepart(year, C.CreationDate),
    datepart(month, C.CreationDate),
    datepart(day, C.CreationDate)
  ) as Created,
  Count(C.Id) as [Number of Comments]
from
  Comments as C
  left join Posts as P on P.Id = C.PostId
where
  lower(C.Text) like ##word:string?%thank%##
  and
  C.CreationDate >= dateadd(##metric?day##, ##offset?-7##, getdate())
  and
  P.PostTypeId = iif( ##type:string?answer## = 'answer' , 2 , 1 )
group by
  datefromparts(
    datepart(year, C.CreationDate),
    datepart(month, C.CreationDate),
    datepart(day, C.CreationDate)
  )
order by
  Created

Enter Parameters

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