Exercise

Organizing with CTEs

Previously, you modified a query based on a statement you completed in chapter 2 using common table expressions.

This time, let's expand on the exercise by looking at details about matches with very high scores using CTEs. Just like a subquery in FROM, you can join tables inside a CTE.

Instructions

100 XP
  • Declare your CTE, where you create a list of all matches with the league name.
  • Select the league, date, home, and away goals from the CTE.
  • Filter the main query for matches with 10 or more goals.