select t2.d_year, t2.d_month, Round(100.0 * t2.diff / t2....


Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

select t2.d_year, t2.d_month, Round(100.0 * t2.diff / t2.prev_month, 2) as Percentage


  select t1.d_year, t1.d_month, count( as d_count,
  LAG(count( OVER (ORDER BY t1.d_year, t1.d_month) AS prev_month, 
  count( - (LAG(count( OVER (ORDER BY t1.d_year, t1.d_month)) as diff
    select id, YEAR(CreationDate) as d_year, MONTH(CreationDate) as d_month
    from posts
  ) t1
  group by t1.d_month, t1.d_year
) t2
where Round(100.0 * t2.diff / t2.prev_month,2) < 0
order by t2.d_year, t2.d_month

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results