title: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause. Error in Maria DB
body: <p>I am using MariaDB IMDB movie dataset and I was trying to solve the below question. Movies table contains id,name,rank and year column<br></p>
  
  <pre>
  A decade is a sequence of 10 consecutive years. For example, say in your database you have movie information starting from 1965. Then the first decade is 1965, 1966, ..., 1974; the second one is 1967, 1968, ..., 1976 and so on. Find the decade D with the largest number of films and the total number of films in D.
  </pre>
  
  <p>I am getting the below error when i tried to execute the below query
  <code>
  SELECT
    SUM(T3.MOVIE_PER_YEAR),
    T3.GROUP_PER_DECADE
    FROM
    (
  SELECT
        CEIL(T2.ROW_NUM/10) AS GROUP_PER_DECADE,
        T2.MOVIE_PER_YEAR,
        T2.YEAR
  FROM
        (
          SELECT
              ROW_NUMBER() OVER (ORDER BY T1.YEAR ASC) AS row_num,
              T1.MOVIE_PER_YEAR,
              T1.YEAR
          FROM
              (SELECT 
                COUNT(M.id) AS MOVIE_PER_YEAR
                ,M.year 
              FROM 
                movies M 
              GROUP BY 
                M.year
              )T1
      )T2
  )T3 GROUP BY GROUP_PER_DECADE;
  </code></p>
  
  <p>Error:- <br></p>
  
  <pre>
  Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
  </pre>
  
  <p>Same type of query is working in Oracle DB.
  <br>
  <a href="http://sqlfiddle.com/#!4/cdf8e3/9" rel="nofollow noreferrer">http://sqlfiddle.com/#!4/cdf8e3/9</a>
  <br></p>
  
  <p>Please help me on this.</p>