1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation in SQL

Exercise

Nested simple subqueries

Nested subqueries can be either simple or correlated.

Just like an unnested subquery, a nested subquery's components can be executed independently of the outer query, while a correlated subquery requires both the outer and inner subquery to run and produce results.

In this exercise, you will practice creating a nested subquery to examine the highest total number of goals in each season, overall, and during July across all seasons.

Instructions

100 XP
  • Complete the main query to select the season and the max total goals in a match for each season. Name this max_goals.
  • Complete the first simple subquery to select the max total goals in a match across all seasons. Name this overall_max_goals.
  • Complete the nested subquery to select the maximum total goals in a match played in July across all seasons.
  • Select the maximum total goals in the outer subquery. Name this entire subquery july_max_goals.