select convert(date,creationdate) [date] , count(*) [cnt]...

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 convert(date,creationdate) [date]
     , count(*) [cnt]
from posthistory 
where posthistorytypeid = 35
and creationdate > convert(date,dateadd(d, -60, (select max(creationdate) from posthistory)))
group by convert(date,creationdate)
order by convert(date,creationdate)


select left(comment,charindex('.com/', comment) - 1) [target]
     , count(*) [cnt]
from posthistory 
where posthistorytypeid = 35
and creationdate > convert(date,dateadd(d, -90, (select max(creationdate) from posthistory)))
group by left(comment,charindex('.com/', comment) - 1)
order by left(comment,charindex('.com/', comment) - 1)

Enter Parameters

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