select count(*) as count, count(distinct case when ViewCo...

0

Please login or register to vote for this query.

(click on this box to dismiss)

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

プログラマーとプログラミングに熱心な人々のための質問と回答

select
  count(*) as count,
  count(distinct case when ViewCount >= 500 then Id end) as over500,
  count(distinct case when ViewCount >= 1000 then Id end) as over1k,
  max(ViewCount) as vcmax,
  avg(ViewCount) as vcavg
from Posts
where CreationDate >= '2015-02-01' and CreationDate < '2015-05-01'

Enter Parameters

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