Would someone will be able to explain me 2 points:
Why HAVING must come after GROUP BY?
Why we do in HAVING, AVG(budget) and not HAVING avg_budget ?
Thanks a lot !!
SELECT release_year, AVG(budget) AS avg_budget, AVG(gross) AS avg_gross
WHERE release_year > 1990
GROUP BY release_year
HAVING AVG(budget) > 6000000