title: Finding some difficulty trying to ORDER BY the SUM(Revenue) with this query
body: <p>I would like to order the result by using the SUM(Revenue), Below is my code kindly help me fix it, Thank you</p>
  <p>SELECT
  EXTRACT(YEAR FROM Release_date) AS year_released, COUNT(Genre) AS number_of_comedy,SUM(Revenue)AS total_revenue
  FROM
  Movie_data.movie
  WHERE
  Genre='Comedy'
  GROUP BY
  EXTRACT(YEAR FROM Release_date)
  ORDER BY
  SUM(Revenue)
  LIMIT
  1000</p>
  <p>THE ERROR MESSAGE I get is &quot;SELECT list expression references column Release_date which is neither grouped nor aggregated at [2:19]&quot;</p>