Tags/Vets/Younger

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity Meta

Q&A about the site for committed Christians, experts in Christianity and those interested in learning more

select 
tags.tagname,
'younger' as age_cat,
sum(users.reputation) rep_tot, 
sum(posts.score) score_tot,
count(posts.owneruserid) users_tot
from users, posts, posttags, tags 
where
users.age is not null and users.age between 15 and 40
and users.reputation between 2 and 100000 
and year(posts.creationdate)=2012
and posts.owneruserid=users.id
and posts.id = posttags.postid
and posttags.tagid=tags.id
group by tags.tagname
order by users_tot desc

Enter Parameters

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