ระหว่างบอสตันและเดนเวอร์ ฉันต้องการเที่ยวบินที่ใช้เวลาแวะจอดน้อยที่สุดเพื่อไปบอสตัน ไม่จำเป็นต้องใช้ตารางทั้งหมด
between BOSTON and DENVER i'd like a flight that takes the least amount of stops to get to BOSTONIt is not neccessary to use all the tables.
 restriction:  restriction_code [ text]  advance_purchase [ int]  stopovers [ text]  saturday_stay_required [ text]  minimum_stay [ int]  maximum_stay [ int]  application [ text]  no_discounts [ 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 (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 = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.stops = (SELECT MIN(FLIGHTalias1.stops) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, flight AS FLIGHTalias1 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 = 'BOSTON' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code)