ฉันต้องการเที่ยวบินจากซานดิเอโกไปโตรอนโตบน AS ซึ่งจะออกเดินทางประมาณ 13.00 น. ไม่จำเป็นที่จะต้องใช้ตารางทั้งหมด
i'd like a flight from SAN DIEGO to TORONTO on AS leaving around 1pmIt is not neccessary to use all the tables.
 month:  month_number [ int]  month_name [ text] 
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (((flight.departure_time <= 1330 AND flight.departure_time >= 1230) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TORONTO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN DIEGO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'AS'