Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
3. Get to know the data – the City and Mountain tables
Very simple subqueries
Subqueries with multiple results
Correlated subqueries
Other subqueries


All right, let's move on and check out the City table. There are different cities in each country, so the table gathers information about them. It gives you each country's:

  • ID
  • Name
  • Country ID
  • Population
  • Area (in square kilometers)
  • Rating (where 5 means 'no better place on Earth' and 1 means 'boring as hell')

How about the Mountain table? Each country has some mountain ranges, so the travel agency gathers information on them too. The table stores columns for each mountain's:

  • ID
  • Name
  • Height (in meters)
  • Country ID

Not much happening here. Let's move on!


  1. Open the Database tab on the right.
  2. Take a look at the City table.
  3. Take a look at the Mountain table.
  4. When you're done, click Next exercise to proceed.