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)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

select top 100 p.id as [Post Link]
, sum(case 
      when v.votetypeid = 2 
      then 1.0 / datediff(day,getdate(), v.creationdate) 
      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