Good question vs includes code

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

select case when q.score > 0 and q.closeddate is null then 'yes'
            when q.score < 0 or q.closeddate is not null then 'no'
            else 'meh' end as GoodQuestion
     , case when q.body like '%<code>%' then 'yes'
            else 'no' end as IncludesCode
     , count(*) as Count
  from posts q
 where q.posttypeid = 1
   and q.viewcount > 10
   and q.creationdate > ( select max(creationdate)
                           from posts ) - 30
 group by case when q.score > 0 and q.closeddate is null then 'yes'
               when q.score < 0  or q.closeddate is not null then 'no'
               else 'meh' end
        , case when q.body like '%<code>%' then 'yes'
               else 'no' end
 order by case when q.score > 0 and q.closeddate is null then 'yes'
               when q.score < 0  or q.closeddate is not null then 'no'
               else 'meh' end

Enter Parameters

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