select top 100 p.id as [Post Link] , sum(case when v.vote...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drones and Model Aircraft Meta

Q&A for experienced flyers, pilots, and builders of drones and model aircraft

select top 100 p.id as [Post Link]
, sum(case 
      when v.votetypeid = 2 
      then 1.0 / datediff(day, v.creationdate, getdate()) 
      else null end) 
from posts p 
inner join votes v on v.postid = p.id
where v.votetypeid = 2 
group by p.id
order by 2

Enter Parameters

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