0 Please login or register to vote for this query. (click on this box to dismiss) (click on this box to dismiss) Q&A for professional and enthusiast programmers

/* I wanted to see which top tags are more popular on weekends, i.e. what technologies do people use for business, and which for pleasure */ select t.tagname, sum( case when datepart(dw, p.creationdate) in (1, 7) then 1.0 else 0.0 end) / count(*) as weekendratio from tags t inner join posttags pt on t.id = pt.tagid inner join posts p on pt.postid = p.id where t.count > 40000 group by t.id, t.tagname, t.count order by weekendratio desc ;

fork query edited may 29 16 created may 29 16 anonymous

Enter Parameters