with parshatags (tagid,tagname) as ( select id,tagname fr...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mi Yodeya

Q&A for those who base their lives on Jewish law and tradition and anyone interested in learning more

with parshatags (tagid,tagname)
as (
 select id,tagname from tags
 where tagname in ('parashat-bereishit','parashat-noach','parashat-lech-lecha','vayera','parashat-chaye-sara','parashat-toldot','vayeitzei','vayishlach','parashat-vayeishev','miketz','vayigash','vayechi','parashas-shemos','va-eira','bo','beshalach','parashas-yisro','mishpatim','parashat-teruma','tetzaveh','parashat-ki-tisa','vayakhel','pekudei','parashat-vayikra','tzav','parashat-shemini','parashat-tazria','parashat-metzora','achrei-mos','parashas-kedoshim','parashas-emor','behar','bechukosai','bamidbar-parsha','parshat-nasso','behaalotcha-parsha','parashat-shelach','parshat-korach','chukas','parashat-balak','pinchas','mattos','masei','devorim','vaeschanan','ekev','parashat-reeh','parashas-shoftim','ki-teitzei','ki-tavo','parashat-nitzavim','vayelech','haazinu','parashat-vezot-habracha')
)

select
t.tagname [parsha]
,count(distinct p.id) [good questions]
from posts p join posttags pt
on p.id = pt.postid
and p.posttypeid=1
join parshatags t
on pt.tagid = t.tagid
join posts a
on a.parentid = p.id
where p.score >= ##minQuestionScore##
and a.score >= ##minAnswerScore##
and p.closeddate is null
and p.deletiondate is null
group by t.tagname

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results