select mm, cnt as curentY, previousY, round(100-cnt*100.0...


Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

select mm, cnt as curentY, previousY, round(100-cnt*100.00/previousY,2) 
  from (
   select mm, cnt, lag(cnt) over (order by mm) previousY
     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)
   ) tb
  ) tb
 where cnt < previousY
 order by mm

Enter Parameters

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