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

Instruction

Okay! Complex instructions require complex examples. Let's imagine a travel agency and its database. We're going to work with as many as 5 tables this time: country, city, mountain, trip, and hiking_trip. Let's analyze them. Use the Database button on the right to see the contents of each table discussed.

Let's start with the table country.

As you can see, there are different countries listed in the table country. The travel agency operates in all of them, so we need some basic info in the table: the id of the country, the name of the country, its population, and the area in square kilometers.

Exercise

Open the Database tab on the right and take a look at the table country. Then click Next exercise to proceed.