ฉันต้องการตั๋วเครื่องบินจากเดนเวอร์ไปแอตแลนต้า ฉันต้องการชั้น COACH หรือตั๋วราคาต่ำสุดไม่จำเป็นต้องใช้ตารางทั้งหมด
i'd like a ticket on a plane from DENVER to ATLANTA i would like a COACH class or lowest fare ticketIt is not neccessary to use all the tables.
 flight_fare:  flight_id [ int]  fare_id [ int] 
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE ((fare_basis.class_type = 'COACH' AND fare.fare_basis_code = fare_basis.fare_basis_code) OR fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, fare AS FAREalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'DENVER' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'ATLANTA' AND FAREalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FAREalias1.to_airport = AIRPORT_SERVICEalias3.airport_code)) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code