PTIJ Comparer?

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

declare @ptij nvarchar(25);
set     @ptij = '%<purim-torah-in-jest>%'
;
/*
select  Sum(case when posts.tags like @ptij then  1 else 0 end)     as ptij
from    posts
where   posttypeid = 1 -- question
        and year(creationdate) = 2013
        and month(creationdate) = 2
        and 9 < day(creationdate)
        and day(creationdate) < 28
;
above is 33,
but I can't see results of the below while above is uncommented
*/
select  sum(case when posts.tags not like @ptij then 1 else 0 end) as nonptij,
        month(creationdate)                       as mon
from    posts
where   posttypeid = 1 -- question
        and year(creationdate) = 2013
        and 9 < day(creationdate)
        and day(creationdate) < 27
group   by month(creationdate)
order by month(creationdate)
;

Enter Parameters

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