プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答
select users_quantile, posts_quantile from ( Select count(n_posts) OVER(ORDER BY n_posts+0.000000001*OwnerUserId Desc) users_quantile, sum(n_posts) OVER(ORDER BY n_posts+0.000000001*OwnerUserId Desc) posts_quantile from ( select count(id) n_posts, OwnerUserId from Posts where PostTypeId = 2 and datepart(year, CreationDate)=2019 group by OwnerUserId ) a ) b