Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation
with a as ( select top 100 ROW_NUMBER() OVER(ORDER BY convert(varchar(7), creationdate, 102) desc) AS row, convert(varchar(7), creationdate, 102) as postdate, count(id) as cnt from posts group by convert(varchar(7), creationdate, 102) ) select a.row, a.postdate, a.cnt as curr, prev.cnt as prev, a.cnt*100/prev.cnt as perc from a inner join a prev on prev.row = a.row + 1 where a.cnt < prev.cnt