Example: Advanced Multiple Subqueries
In the previous exercise, you added a subquery to the FROM
statement and selected the stages where the number of average goals in a stage exceeded the overall average number of goals in the 2012/2013 match season. In this final step, you will add a subquery in SELECT
to compare the average number of goals scored in each stage to the total.
- Create a subquery in
SELECT
that yields the average goals scored in the 2012/2013 season. Name the new column overall_avg
. - Create a subquery in
FROM
that calculates the average goals scored in each stage during the 2012/2013 season. - Filter the main query for stages where the average goals exceeds the overall average in 2012/2013.