Top tags by monthes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

select tag, month from (
  select tags.tagName tag, dateAdd(day, 1, eOMonth(posts.creationDate, -1)) month,
    row_number() over (
      partition by tags.tagName
      order by count(dateAdd(day, 1, eOMonth(posts.creationDate, -1))) desc
    ) as rn
    from tags
    left join posts on
      charindex('<' + tags.tagName + '>', posts.tags) > 0
  group by tags.tagName, (dateAdd(day, 1, eOMonth(posts.creationDate, -1)))
) subquery
where subquery.rn = 1

Enter Parameters

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