select mm,cnt as curr,prev,round(100-cnt*100.00/prev,2) prc

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

select mm,cnt as curr,prev,round(100-cnt*100.00/prev,2) prc
  from (
   select mm,cnt,lag(cnt) over (order by mm) prev
     from (
      select year(creationDate)*100+month(creationDate) as mm,
             count(1) as cnt
        from posts
       where PostTypeId between 1 and 2
       group by year(creationDate)*100+month(creationDate)
   ) as A
  ) as A
 where cnt < prev
 order by mm

Enter Parameters

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