ค้นหาเที่ยวบินจากโตรอนโตไปซานดิเอโกด้วยการแวะพักที่วอชิงตันบน DL ไม่จำเป็นต้องใช้ตารางทั้งหมด
find a flight from TORONTO to SAN DIEGO with a layover in WASHINGTON on DLIt is not neccessary to use all the tables.
 airport_service:  city_code [ varchar]  airport_code [ varchar]  miles_distant [ int]  direction [ varchar]  minutes_distant [ int] 
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN DIEGO' AND CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'WASHINGTON' AND CITY_2.state_code = 'DC' AND flight_stop.stop_airport = AIRPORT_SERVICE_2.airport_code AND flight.flight_id = flight_stop.flight_id AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TORONTO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'DL'