Lecture
List Passengers with No Reservations
Your supervisor wants to contact passengers who haven’t booked any flights yet, perhaps for a promotion or reminder campaign.
To identify these passengers, you’ll search for entries in the passengers table without corresponding reservations.
This is a classic case for using a LEFT JOIN with IS NULL — a powerful combination for finding unmatched records between tables.
What to Show
From the flight_reservations.sqlite database, display the following column:
name— from the passengers table
How to solve it
Use a LEFT JOIN to combine passengers with reservations on passenger_id, and filter for rows where reservation_id is NULL to show passengers who have no bookings.
Write a SQL query that returns only those passengers without any reservations.
Previous lessonJoin Flights with PassengersNext lessonFind Customers with High-Priced Ticket Purchases
Lessons in this chapter · Solve real-world problems with SQL.
- 1. Filter Bookings by Region
- 2. Sort and Limit Recent Reservations
- 3. Use Logical AND/OR to Filter Hotel Data
- 4. Count Transactions by Customer
- 5. Calculate Average Spending per Client
- 6. Filter Customers with High Transaction Totals
- 7. Join Flights with Passengers
- 8. List Passengers with No Reservations
- 9. Find Customers with High-Priced Ticket Purchases
- 10. Filter Events with Above-Average Ticket Sales
sqlQuiz
?
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help