whyt

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select
  *
from
  (
  select
    sum(case when C.Text like '%what have you tried%' then 1 else 0 end) as TriedComments,
    P.ID
  from
    Posts as P
    left join Comments as C on C.PostID = P.ID 
  where    
    P.creationdate > '2013-02-15'
    and P.posttypeid = 1
  group by
    P.ID
    ) as A
order by
  A.TriedComments desc

Enter Parameters

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