Scratchpad2

0

Please login or register to vote for this query.

(click on this box to dismiss)

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

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

with x(Rep, CreationDate, LastPostedDate, Id) as(
 select a.Reputation,
        a.CreationDate,
        max(b.CreationDate),
        a.Id
  from Users a, Posts b
 where b.OwnerUserId = a.Id
 group by a.Reputation,a.CreationDate,a.Id
 )
select top 200 Rep,
       round(cast(Rep as float)/DATEDIFF(dd,CreationDate,LastPostedDate),1) RepPerDay,
       Id as [User Link]
  from x
 where DATEDIFF(dd,CreationDate,LastPostedDate) > 30
 and Id = 646591
 order by RepPerDay desc;

Enter Parameters

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