Skip to main content
Practice

Join Flights with Passengers

The reservations team needs a complete list of upcoming flights, including the names of passengers on each booking.

Your task is to create a report that combines passenger information with flight reservation details.

You’ll use an INNER JOIN to connect records from two related tables — passengers and reservations.

Joins like this are a core part of SQL and essential for combining data from multiple sources.


What to Show

From the flight_reservations.sqlite database, display:

  • name (from the passengers table)
  • flight_code
  • departure_date

Task

Use INNER JOIN to combine the passengers and reservations tables on their shared passenger_id.

Write a SQL query that returns each passenger’s name, flight code, and departure date — showing only passengers with active reservations.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.