Course Content
Intermediate SQL
2. Nested Subqueries
4. Left, Right, and Inner Joins
Intermediate SQL
Challenge: Information about Passenger Flight Departure
Task
You have to join two tables: departure
and passenger
.
- Select
surname_passenger
, andname_passenger
frompassenger
table; - Select
departure_date
from thedeparture
table; - Join these two tables using the
JOIN
statement by thenumber_of_departure
column.
Here's a short example of the departure
table:
number_of_departure | flight_number | departure_date | departure_time |
1 | 3 | 2022-07-16 | 08:00:00 |
2 | 1 | 2022-07-18 | 13:15:00 |
... | ... | ... | ... |
6 | 3 | 2022-07-16 | 08:00:00 |
Here's a short example of the passenger
table:
id | number_of_departure | name_passenger | surname_passenger |
1 | 5 | Liam | Smith |
2 | 5 | Olivia | Johnson |
... | ... | ... | ... |
18 | 5 | Olivia | Johnson |
Everything was clear?
Section 3. Chapter 3