Billboard (best of SO!)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS

Q&A for administrators, end users, developers and designers for Craft CMS

-- Billboard (best of SO!)

select top(100) 
  q.id as [Post Link],
  q.score [Question Score], 
  max(a.score)[Answer Score], 
  q.viewcount as Views,
  floor(0.5+(q.score+max(a.score))/(log(q.viewcount))) as Interestingness 
from posts q 
inner join posts a on q.id=a.parentid
where 
  q.posttypeid=1 and 
  a.posttypeid=2 and
  q.creationdate > cast('2011-01-27' as datetime)
group by q.id, q.score, q.viewcount, q.title
order by Interestingness desc

Enter Parameters

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