我使用以下查询在Mac终端中生成488行元组,但它只生成了420行。我将此查询发送给了我的朋友,并在他的Mac上使用我的查询生成了488行。我为此分配所做的错误查询最多可生成数千行。我的Mac是MacBook Pro 2016,我把它像鸡蛋一样小心,所以它不应该有硬件问题。请分享您的想法以解决此问题。我很感激。
SELECT DISTINCT c.name, f1.flight_num, f1.origin_city, f1.dest_city,
f1.actual_time ,
f2.flight_num, f2.origin_city, f2.dest_city, f2.actual_time ,
(f1.actual_time + f2.actual_time)/60
FROM Flights f1, Flights f2, Carriers c, Months m
WHERE f1.carrier_id = f2.carrier_id AND f1.carrier_id = c.cid
AND f1.day_of_month = f2.day_of_month AND f1.day_of_month = 15
AND f1.year = f2.year AND f1.year = 2015
AND f1.month_id = f2.month_id AND f1.month_id = m.mid AND f2.month_id =
m.mid AND m.month ='July'
AND f1.origin_city ='Seattle WA' AND f2.dest_city ='Boston MA' AND
f1.dest_city = f2.origin_city
AND (f1.actual_time + f2.actual_time )<60*7;