ฉันกำลังพยายามเชื่อมต่อระหว่าง DENVER และ SAN FRANCISCO โดยที่ DL บินระหว่างสองตารางนั้น ไม่จำเป็นต้องใช้ตารางทั้งหมด
i'm trying to make a connection between DENVER and SAN FRANCISCO does DL fly between those twoIt is not neccessary to use all the tables.
 flight_fare:  flight_id [ int]  fare_id [ int] 
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.airline_code = 'DL') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND flight.airline_code = airline.airline_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code