The question is: You want to be the first to book and pick seats for a flight. Find the flight_num
and date of all flights for which there are no reservations.
From the following tables:
Flights
(flight_num, source_city, dest_city
)Departures
(flight_num, date, plane_type
)Passengers
(passenger_id, passenger_name, passenger_address
)Bookings
(passenger_id, flight_num, date, seat_number
)
My answer was:
SELECT D.flight_num, D.date
FROM DEPARTURES D, BOOKINGS B
WHERE B.passenger_id = NULL
I know this is wrong, but can anyone tell me why? What is the answer to this?