Sort latest most viewed questions according to tags?


Please login or register to vote for this query.

(click on this box to dismiss)

Startups Meta

Q&A for entrepreneurs faced with delivering a new product or service under conditions of significant uncertainty

select top 100 tagname
     , sum(cast(p.viewcount as bigint)) as [sum of views]
     , avg(cast(p.viewcount as bigint)) as [average of views]
from posts p
inner join posttags pt on pt.postid =
inner join tags t on = pt.tagid
where p.creationdate > dateadd(m, -1, getdate())
and p.posttypeid = 1
group by tagname
order by 2 desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results