Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT aid, AVG(distance) FROM aircraft WHERE "aid" >= 13 AND name != "Boeing 737-800" UNION ALL SELECT aid, AVG(distance) FROM flight WHERE departure_date = "04/12/2005 09:00" AND "flno" <= 33 OR "aid" != 6 OR "distance" = 802 OR "price" > 220.98 AND origin = "Chicago"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 4 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1


Question: SELECT document_id FROM Documents WHERE document_type_code <> "Hard Drive" AND receipt_date <> "1996-05-31 06:51:58" AND "document_id" <> 7 INTERSECT SELECT document_id FROM Draft_Copies WHERE "draft_number" <= 8 OR "copy_number" >= 4 OR "document_id" >= 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT MIN(copy_number), draft_number, document_id FROM Circulation_History WHERE "document_id" >= 2 OR "copy_number" = 15 OR "draft_number" = 20 UNION ALL SELECT MIN(copy_number), draft_number, document_id FROM Draft_Copies WHERE "draft_number" <> 12 OR "document_id" != 20


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT document_status_code, document_status_description FROM Ref_Document_Status WHERE document_status_description != "currently working on" OR document_status_code = "working" INTERSECT SELECT document_status_code, document_status_description FROM Ref_Document_Status WHERE document_status_code != "working"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT id FROM airport WHERE IATA = "BCN" AND name <> "Akureyri Airport" UNION SELECT id FROM flight WHERE "company_id" = 9 AND "Altitude" > 3650.0 OR "Velocity" <= 240.0 AND "airport_id" <= 1 OR Pilot != "Thompson" OR "id" = 4 OR Date != "July 16, 1965" AND Vehicle_Flight_number <> "M2-F1 #21"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT department_ID, temporary_acting FROM management WHERE temporary_acting <> "Yes" OR "head_ID" != 5 AND "department_ID" > 2 UNION ALL SELECT department_ID, temporary_acting FROM management WHERE temporary_acting <> "Yes" AND "head_ID" != 5 OR "department_ID" > 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT Branch_ID FROM branch WHERE Open_year = "2014" AND City = "Oxford" AND Name != "Stanley" OR Address_road != "Brampton Road" AND membership_amount <> "56" AND "Branch_ID" <> 6 EXCEPT SELECT Branch_ID FROM membership_register_branch WHERE Branch_ID <> "1" AND Register_Year != "2017" OR "Member_ID" < 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT Template_Type_Description FROM Ref_Template_Types WHERE Template_Type_Description != "Advertisement" OR Template_Type_Code = "CV" UNION SELECT Template_Type_Description FROM Ref_Template_Types WHERE Template_Type_Description <> "CV"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 7 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT property_id FROM Other_Property_Features WHERE "feature_id" < 2 OR "property_id" <= 1 EXCEPT SELECT property_id FROM Properties WHERE "property_id" >= 8 AND property_address = "2088 Bashirian Fork Suite 337 Faustinoport, MT 16771-9320" OR "buyer_offered_price" <> 13991131.434 AND fld_feature_3 = "None" OR apt_feature_3 != "None" OR fld_feature_1 <> "None" AND fld_feature_2 != "None" AND other_property_details <> "None" OR oth_feature_2 = "None" AND date_on_market = "1978-05-15 10:53:37" AND "vendor_requested_price" >= 2198735.095 AND property_type_code != "Other" AND apt_feature_1 <> "ut" AND date_sold <> "1973-02-24 02:56:06" OR hse_feature_1 <> "None" OR "room_count" <= 2 OR oth_feature_3 != "None" AND hse_feature_3 != "None" AND property_name <> "riverside"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT SUM(T1.Transit_Passengers), T2.Aircraft_ID FROM airport as T1 JOIN airport_aircraft as T2 ON T1.Airport_ID = T2.Airport_ID


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 5


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 4 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 5 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT LName, SUM(Advisor), COUNT(Major) FROM Student WHERE "StuID" != 1031 AND "Advisor" <= 8772 AND "Age" < 17 OR city_code = "HKG" OR LName = "Han" UNION ALL SELECT LName, SUM(Advisor), COUNT(Major) FROM Student WHERE Fname = "David" OR city_code <> "BAL" OR "Age" > 20 AND "Major" = 600 AND Sex <> "M" OR LName <> "Apap" OR "Advisor" > 1148 AND "StuID" <> 1019


Question: SELECT COUNT(temporary_acting), MAX(department_ID) FROM management WHERE "department_ID" <= 2 AND "head_ID" <= 10 AND temporary_acting <> "No" EXCEPT SELECT COUNT(temporary_acting), MAX(department_ID) FROM management WHERE "head_ID" > 10 AND "department_ID" < 2 OR temporary_acting != "Yes"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT MIN(T1.age), T2.head_ID FROM head as T1 JOIN management as T2 ON T1.head_ID = T2.head_ID WHERE "department_ID" = 15


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT customer_id FROM Customers WHERE "customer_id" != 15 AND date_became_customer <> "2015-11-16 22:52:14" OR first_name = "Sigrid" UNION ALL SELECT customer_id FROM Lessons WHERE lesson_status_code = "Completed" AND lesson_time != "9"


Question: SELECT SUM(contestant_number) FROM CONTESTANTS WHERE contestant_name <> "Tabatha Gehling" UNION SELECT SUM(contestant_number) FROM VOTES WHERE "vote_id" = 1 OR "contestant_number" > 2 AND state = "NJ "


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 8 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 5 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT SUM(Publication_ID), AVG(Price), Publisher, SUM(Book_ID) FROM publication WHERE "Publication_ID" <> 2 AND "Price" = 3000000.0 OR Publication_Date = "April 2007" UNION ALL SELECT SUM(Publication_ID), AVG(Price), Publisher, SUM(Book_ID) FROM publication WHERE "Publication_ID" >= 7 AND Publisher = "Pearson"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 5 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT document_id FROM Circulation_History WHERE "document_id" != 2 OR "draft_number" > 2 AND "copy_number" <= 10 AND "employee_id" > 1 UNION SELECT document_id FROM Circulation_History WHERE "copy_number" > 15 AND "draft_number" <= 2 OR "employee_id" != 8 OR "document_id" <> 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 4 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 5 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Company_ID, People_ID, Year_working FROM employment WHERE "People_ID" >= 3 OR "Company_ID" >= 13 AND "Year_working" >= 1 EXCEPT SELECT Company_ID, People_ID, Year_working FROM employment WHERE "Year_working" >= 4 OR "Company_ID" < 11


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT head_ID FROM head WHERE "age" >= 50.0 OR "head_ID" >= 8 AND born_state != "Alabama" UNION ALL SELECT head_ID FROM management WHERE "department_ID" <> 7 OR temporary_acting = "No"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT People_ID, Year_working, Company_ID FROM employment WHERE "People_ID" < 4 AND "Company_ID" < 13 UNION ALL SELECT People_ID, Year_working, Company_ID FROM employment WHERE "Year_working" <> 3 AND "People_ID" > 1 AND "Company_ID" < 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT MAX(T1.Age), T2.School_ID FROM driver as T1 JOIN school_bus as T2 ON T1.Driver_ID = T2.Driver_ID WHERE Name = "Brandon McGee" OR COUNT(Years_Working) = 2 OR Age <> 52 AND If_full_time <> "T" AND Home_city <> "Coventry" AND Party = "Dem" AND School_ID > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 8 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT contestant_number FROM CONTESTANTS WHERE "contestant_number" >= 11 UNION ALL SELECT contestant_number FROM VOTES WHERE "vote_id" != 5 AND state <> "CA" OR "phone_number" > 5112677315 OR created <> "2018-03-09 19:03:40" AND "contestant_number" >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT Name FROM company WHERE "Assets_in_Billion" > 1873.9 OR "Company_ID" > 2.0 OR "Sales_in_Billion" < 87.6 OR Name <> "Citigroup" AND Headquarters <> "UK" AND Industry <> "Oil and gas" AND "Profits_in_Billion" = 25.1 OR "Market_Value_in_Billion" = 201.9 UNION SELECT Name FROM people WHERE Name != "Tim Naegeli" AND Graduation_College != "Virginia" OR Nationality != "United Kindom" AND "Age" < 30 OR "People_ID" > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 7 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 4


Question: SELECT Rank, Club_ID, Coach_ID FROM coach WHERE "Coach_ID" < 4 OR Gender != "M" OR "Rank" >= 5 UNION SELECT Rank, Club_ID, Coach_ID FROM coach WHERE "Coach_ID" > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT MAX(name) FROM aircraft WHERE "distance" >= 3383 AND "aid" <> 8 OR name != "British Aerospace Jetstream 41" UNION ALL SELECT MAX(name) FROM employee WHERE name != "James Smith" OR "salary" = 212156


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT COUNT(u_id) FROM review WHERE "i_id" = 5 INTERSECT SELECT COUNT(u_id) FROM useracct WHERE "u_id" = 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5


Question: SELECT ClubID FROM Club WHERE ClubDesc != "Refurbish computers; teach kids and adults about computer basics." OR ClubLocation = "AKW" AND ClubName = "Bootup Baltimore" AND "ClubID" <= 4 INTERSECT SELECT ClubID FROM Member_of_club WHERE "StuID" = 1010 OR "ClubID" > 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT head_ID FROM head WHERE name <> "Jeff Maggert" INTERSECT SELECT head_ID FROM management WHERE "department_ID" > 15 OR temporary_acting = "No"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 2 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Earnings, People_ID, Poker_Player_ID FROM poker_player WHERE "Best_Finish" < 2.0 AND "Final_Table_Made" <> 19.0 OR "Earnings" < 596462.0 UNION SELECT Earnings, People_ID, Poker_Player_ID FROM poker_player WHERE "Money_Rank" != 166.0 OR "People_ID" < 6 AND "Best_Finish" < 2.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2


Question: SELECT T1.Description, T2.Aircraft_ID FROM aircraft as T1 JOIN airport_aircraft as T2 ON T1.Aircraft_ID = T2.Aircraft_ID


Question: SELECT Vehicle_Flight_number, Pilot, company_id, Date, airport_id, Altitude, Velocity FROM flight WHERE "id" != 7 OR Date = "July 16, 1965" OR "Altitude" >= 3650.0 AND Pilot != "Peterson" AND Vehicle_Flight_number <> "M2-F1 #61" AND "Velocity" >= 240.0 UNION ALL SELECT Vehicle_Flight_number, Pilot, company_id, Date, airport_id, Altitude, Velocity FROM flight WHERE Pilot != "Peterson" AND Vehicle_Flight_number <> "M2-F1 #73" OR Date = "March 28, 1966"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 10 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT customer_id FROM Customers WHERE date_became_customer != "2016-11-30 10:37:41" OR customer_status_code <> "Bad Customer" OR email_address <> "asha.kilback@example.org" AND date_of_birth <> "1998-09-18 04:45:01" OR "amount_outstanding" != 9500.0 OR cell_mobile_phone_number <> "+57(9)4602098297" AND "customer_id" <> 2 AND first_name <> "Estelle" OR phone_number = "1-673-962-8158x7646" EXCEPT SELECT customer_id FROM Lessons WHERE "vehicle_id" >= 2 OR lesson_status_code <> "Cancelled"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 5 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Driver_ID, Years_Working, If_full_time FROM school_bus WHERE "Driver_ID" >= 7 INTERSECT SELECT Driver_ID, Years_Working, If_full_time FROM school_bus WHERE If_full_time = "T" OR "Driver_ID" != 7 OR "Years_Working" = 6 OR "School_ID" < 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2


Question: SELECT StuID FROM Has_Pet WHERE "PetID" >= 2002 OR "StuID" > 1001 UNION SELECT StuID FROM Has_Pet WHERE "StuID" = 1002


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 3 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT AVG(contestant_number), SUM(state) FROM VOTES WHERE "contestant_number" >= 5 AND "phone_number" < 6209222712 OR created != "2018-03-09 19:03:40" OR "vote_id" != 5 EXCEPT SELECT AVG(contestant_number), SUM(state) FROM VOTES WHERE created <> "2018-03-09 19:03:36" AND state != "NY"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT document_type_code FROM Documents WHERE document_status_code <> "done" OR "document_id" >= 4 AND document_type_code != "Paper" OR other_details <> "n" AND shipping_agent_code != "UP" UNION ALL SELECT document_type_code FROM Ref_Document_Types WHERE document_type_description <> "f" OR document_type_code = "Hard Drive"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT customer_id FROM Customer_Payments WHERE payment_method_code <> "Direct Debit" AND datetime_payment <> "2018-03-20 21:38:41" UNION SELECT customer_id FROM Customer_Payments WHERE payment_method_code <> "Direct Debit" AND datetime_payment <> "2018-02-19 09:06:29" AND "amount_payment" < 1708.18 OR "customer_id" != 14


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 7 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1


Question: SELECT County_Id, Zip_code, Population FROM county WHERE Zip_code <> "D09" EXCEPT SELECT County_Id, Zip_code, Population FROM county WHERE "County_Id" = 1 AND Zip_code <> "D21" AND County_name = "Manning" OR "Population" = 13300.0


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT amount_payment, customer_id, datetime_payment, payment_method_code FROM Customer_Payments WHERE "customer_id" <= 3 EXCEPT SELECT amount_payment, customer_id, datetime_payment, payment_method_code FROM Customer_Payments WHERE payment_method_code <> "Direct Debit" OR "amount_payment" = 1708.18 OR datetime_payment <> "2018-03-18 13:48:13" AND "customer_id" > 13


Question: SELECT Member_ID FROM member WHERE "Level" = 6 UNION ALL SELECT Member_ID FROM membership_register_branch WHERE "Member_ID" <= 7 AND Register_Year <> "2016"


Question: SELECT MIN(PetID), weight, PetType FROM Pets WHERE "PetID" = 2001 OR "weight" = 12.0 AND PetType = "dog" AND "pet_age" = 2 UNION SELECT MIN(PetID), weight, PetType FROM Pets WHERE "weight" < 13.4 OR PetType != "cat"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3


Question: SELECT Member_ID, Branch_ID FROM membership_register_branch WHERE "Member_ID" <> 5 AND Register_Year = "2017" UNION SELECT Member_ID, Branch_ID FROM purchase WHERE Branch_ID <> "6" AND "Total_pounds" <= 20.99 OR "Member_ID" <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT CountryId, CountryName FROM countries WHERE "Continent" < 3 AND "CountryId" < 5 OR CountryName != "france" UNION SELECT CountryId, CountryName FROM countries WHERE "CountryId" >= 8 AND "Continent" > 1 AND CountryName = "uk"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT Advisor, Fname, Major, Age, city_code FROM Student WHERE Sex = "M" AND Fname <> "Jun" AND "Age" = 18 EXCEPT SELECT Advisor, Fname, Major, Age, city_code FROM Student WHERE "Age" <= 17 AND city_code = "NYC" AND LName <> "Cheng" OR Fname <> "Sarah" AND "Advisor" > 8423


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT MIN(state) FROM AREA_CODE_STATE WHERE state <> "TN" OR "area_code" < 979 UNION ALL SELECT MIN(state) FROM VOTES WHERE created <> "2018-03-09 19:03:39" AND state <> "NY" OR "phone_number" < 7182887233 OR "vote_id" <> 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT Zip_code FROM county WHERE "Population" <= 21000.0 AND Zip_code <> "D02" UNION SELECT Zip_code FROM county WHERE "Population" <> 13300.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 3


Question: SELECT document_id FROM Documents WHERE document_status_code = "working" OR other_details <> "j" UNION SELECT document_id FROM Draft_Copies WHERE "draft_number" > 9 OR "document_id" = 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 3


Question: SELECT SUM(i_id) FROM item WHERE title != "shampoo" OR "i_id" <= 0 UNION SELECT SUM(i_id) FROM review WHERE "u_id" >= 1 OR "a_id" > 7


Question: SELECT id FROM flight WHERE "company_id" >= 7 AND Pilot = "Thompson" OR "Altitude" > 3650.0 OR Vehicle_Flight_number != "M2-F1 #1" OR Date <> "January 29, 1964" INTERSECT SELECT id FROM operate_company WHERE name <> "Cathay Pacific Catering Services (HK) Limited"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2


Question: SELECT COUNT(T1.District_ID), T2.District_ID FROM district as T1 JOIN store_district as T2 ON T1.District_ID = T2.District_ID WHERE District_name <> "Khanewal District"


Question: SELECT MIN(Book_ID), Issues FROM book WHERE Writer = "Christopher Hinz" AND "Issues" > 9.0 UNION SELECT MIN(Book_ID), Issues FROM book WHERE "Issues" != 12.0 OR Title <> "Dead Corps" OR "Book_ID" = 3 AND Writer = "Garth Ennis"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT SUM(Employee_ID) FROM employee WHERE "Employee_ID" > 4 OR City = "Bath" UNION ALL SELECT SUM(Employee_ID) FROM evaluation WHERE "Bonus" <> 3000.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT Position, StuID, ClubID FROM Member_of_club WHERE Position = "Vice-President" OR "StuID" <> 1001 OR "ClubID" < 1 INTERSECT SELECT Position, StuID, ClubID FROM Member_of_club WHERE "ClubID" <> 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT document_id, mailed_to_address_id, mailing_date FROM Documents_Mailed WHERE mailing_date != "1992-11-07 15:03:41" OR "mailed_to_address_id" < 4 UNION SELECT document_id, mailed_to_address_id, mailing_date FROM Documents_Mailed WHERE mailing_date = "1999-05-22 23:21:07" AND "document_id" = 7 OR "mailed_to_address_id" < 8


Question: SELECT i_id FROM item WHERE "i_id" <= 3 OR title <> "apple" NOT IN (SELECT i_id FROM item WHERE title <> "shampoo")


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT MAX(City), COUNT(Employee_ID), Name FROM employee WHERE Name = "George Chuter" OR "Age" <= 29 OR "Employee_ID" <= 8 EXCEPT SELECT MAX(City), COUNT(Employee_ID), Name FROM employee WHERE "Age" > 29 AND Name != "Lee Mears" AND City <> "Leicester"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 4 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2


Question: SELECT Club_ID FROM club WHERE Club_name = "Djurgårdens IF" AND "Start_year" >= 1998 AND Region = "USA" EXCEPT SELECT Club_ID FROM coach WHERE Gender != "M"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT Start_year, Club_name, Region, Club_ID FROM club WHERE Club_name = "Gefle IF" UNION SELECT Start_year, Club_name, Region, Club_ID FROM club WHERE "Start_year" <> 2011 OR "Club_ID" >= 6 AND Club_name != "AIK" AND Region = "USA"


Question: SELECT Sex, MIN(Advisor), Age, MIN(StuID), MIN(Major), SUM(LName) FROM Student WHERE "Major" = 550 AND LName <> "Brown" AND "Advisor" != 8423 OR Sex <> "F" AND "StuID" <> 1028 AND Fname != "William" OR "Age" <> 20 OR city_code = "CHI" UNION ALL SELECT Sex, MIN(Advisor), Age, MIN(StuID), MIN(Major), SUM(LName) FROM Student WHERE "StuID" != 1023 OR city_code != "PIT"

Sex MIN(Advisor) Age MIN(StuID) MIN(Major) SUM(LName)


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 5 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5


Question: SELECT document_id FROM Document_Drafts WHERE draft_details = "k" OR "draft_number" < 4 EXCEPT SELECT document_id FROM Documents_Mailed WHERE "document_id" >= 10 AND mailing_date <> "1979-09-21 10:30:52" AND "mailed_to_address_id" <> 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT MIN(document_id) FROM Circulation_History WHERE "document_id" <> 1 AND "employee_id" >= 1 OR "copy_number" > 10 OR "draft_number" > 1 EXCEPT SELECT MIN(document_id) FROM Documents_Mailed WHERE "document_id" > 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 10 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Total_pounds, Branch_ID, Member_ID FROM purchase WHERE "Total_pounds" <= 343.76 UNION ALL SELECT Total_pounds, Branch_ID, Member_ID FROM purchase WHERE "Member_ID" != 3 OR "Total_pounds" <> 321.13 AND Branch_ID = "1"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 5 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2


Question: SELECT People_ID FROM people WHERE "Age" < 31 AND Graduation_College <> "Iowa" INTERSECT SELECT People_ID FROM people WHERE Graduation_College <> "California" OR Name = "Tom Sheehey" OR "People_ID" >= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT MIN(CountryName), SUM(CountryId), Continent FROM countries WHERE CountryName = "germany" OR "CountryId" > 5 UNION SELECT MIN(CountryName), SUM(CountryId), Continent FROM countries WHERE "CountryId" < 13 OR "Continent" <> 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 9 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT i_id FROM item WHERE "i_id" != 4 AND title <> "shampoo" UNION SELECT i_id FROM review WHERE "i_id" < 4 OR "u_id" > 2 AND "rank" != 5


Question: SELECT Store_ID, Product_ID FROM store_product WHERE "Product_ID" >= 4 OR "Store_ID" >= 1 EXCEPT SELECT Store_ID, Product_ID FROM store_product WHERE "Product_ID" <= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 5 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" <> 5 UNION SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" > 0 OR "document_id" != 12


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT SUM(T1.Freight_Metric_Tonnes), T2.Airport_ID FROM airport as T1 JOIN airport_aircraft as T2 ON T1.Airport_ID = T2.Airport_ID


Question: SELECT MAX(Name) FROM company WHERE Name <> "Citigroup" OR Industry = "Oil and gas" AND "Sales_in_Billion" <> 102.6 UNION SELECT MAX(Name) FROM people WHERE Nationality <> "United States"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 11 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT MIN(T1.id), T2.Pilot FROM airport as T1 JOIN flight as T2 ON T1.id = T2.id WHERE IATA = "BLL" AND "Altitude" <> 3650.0 AND "airport_id" <> 1 OR name = "Bergen Airport" OR "company_id" >= 11 AND Country = "Belgium" AND "Velocity" <> 240.0 AND Date = "October 25, 1963" OR City = "Akureyri" OR Pilot <> "Thompson" GROUP BY Vehicle_Flight_number HAVING Velocity > 240.0 OR Pilot = "Thompson"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT u_id FROM useracct WHERE "u_id" != 2 OR name = "Helen" UNION ALL SELECT u_id FROM useracct WHERE "u_id" = 2 AND name != "Nancy"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3


Question: SELECT COUNT(T1.District_ID), T2.District_ID FROM district as T1 JOIN store_district as T2 ON T1.District_ID = T2.District_ID WHERE District_name <> "Khanewal District" GROUP BY Headquartered_City HAVING Headquartered_City <> "Bahawalnagar City" AND Store_ID >= 1 AND City_Population > 314617.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 4 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT District FROM shop WHERE Manager_name != "Kai Nyyssönen" AND "Number_products" = 10000 OR Name = "FC Haka" OR "Shop_ID" > 3 OR District <> "Arto Tolsa Areena" UNION SELECT District FROM shop WHERE "Shop_ID" <= 6 AND Name <> "FF Jaro" AND Manager_name = "Mika Lehkosuo"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Driver_ID FROM driver WHERE "Age" < 40 OR "Driver_ID" = 10 OR Party <> "Rep" OR Name = "Edwin Vargas" EXCEPT SELECT Driver_ID FROM school_bus WHERE If_full_time != "T" OR "Driver_ID" <> 3 OR "School_ID" >= 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT MIN(document_id) FROM Documents WHERE receipt_date != "2005-09-30 00:10:02" OR other_details != "q" OR shipping_agent_code = "FE" OR "document_id" <= 25 UNION ALL SELECT MIN(document_id) FROM Documents_Mailed WHERE mailing_date != "1982-01-14 05:50:54" AND "mailed_to_address_id" != 2 AND "document_id" <= 4


Question: SELECT document_id FROM Circulation_History WHERE "draft_number" < 17 OR "employee_id" = 8 UNION ALL SELECT document_id FROM Documents WHERE other_details = "n" OR shipping_agent_code = "UP"


Question: SELECT Nationality, MAX(Graduation_College), COUNT(Name) FROM people WHERE Graduation_College = "Northeastern" OR Name = "Tim Naegeli" OR Nationality = "United Kindom" AND "People_ID" != 5 OR "Age" <> 37 UNION SELECT Nationality, MAX(Graduation_College), COUNT(Name) FROM people WHERE "Age" = 37 OR Graduation_College != "Northeastern" OR "People_ID" < 1 AND Nationality != "United States" AND Name != "David Butler"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1


Question: SELECT Store_ID FROM store_district WHERE "Store_ID" <= 5 EXCEPT SELECT Store_ID FROM store_product WHERE "Store_ID" >= 5 AND "Product_ID" = 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT Branch_ID FROM branch WHERE City != "London" AND Name != "Saint Amant" AND Open_year = "2009" UNION SELECT Branch_ID FROM membership_register_branch WHERE "Member_ID" <= 5 AND Register_Year <> "2017" AND Branch_ID = "5"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT T1.id, T2.Altitude FROM airport as T1 JOIN flight as T2 ON T1.id == T2.id GROUP BY Altitude HAVING Pilot <> "Thompson" AND company_id >= 5 AND City <> "Brussels" OR Date <> "August 4, 1966" AND ICAO <> "ENBR" OR Country = "Spain" AND Altitude = 3650.0 OR airport_id <= 2 AND Velocity < 240.0 OR IATA <> "AMS"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Employee_ID FROM employee WHERE Name != "Lee Mears" OR "Employee_ID" = 6 OR "Age" != 28 EXCEPT SELECT Employee_ID FROM evaluation WHERE Employee_ID != "1" AND "Bonus" <> 3000.0


Question: SELECT Region FROM club WHERE "Club_ID" > 5 OR Region <> "USA" INTERSECT SELECT Region FROM club WHERE Club_name = "Halmstads BK" OR "Start_year" <= 2005 OR "Club_ID" != 1 OR Region <> "Korea"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Club_ID, Rank FROM coach WHERE Gender <> "F" OR "Coach_ID" >= 4 AND "Rank" <= 3 EXCEPT SELECT Club_ID, Rank FROM match_result WHERE "Club_ID" <> 2 AND "Bronze" = 7 OR "Rank" <= 3 OR "Gold" != 5 AND "Points" <= 168 AND "Big_Silver" <= 9 OR "Small_Silver" != 16


Question: SELECT endowment_id, amount, School_id FROM endowment WHERE "endowment_id" <> 9 UNION SELECT endowment_id, amount, School_id FROM endowment WHERE donator_name <> "Duarte" AND "School_id" < 3 AND "endowment_id" >= 5


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 4 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2


Question: SELECT total_budget_percent_budgeted FROM budget WHERE "total_budget_percent_invested" <> 2.7 OR "Year" < 2005 OR "Budgeted" >= 74849 AND "total_budget_percent_budgeted" != 2.0 INTERSECT SELECT total_budget_percent_budgeted FROM budget WHERE "total_budget_percent_invested" > 2.7 OR "total_budget_percent_budgeted" > 2.0 AND "Invested" != 8335 OR "Year" >= 2004


Question: SELECT id FROM airport WHERE IATA <> "BLL" OR ICAO != "EBBR" OR City <> "Amsterdam" AND Country <> "Norway" AND "id" = 9 EXCEPT SELECT id FROM flight WHERE "airport_id" >= 2 AND "id" = 5 OR Pilot = "Peterson" OR "Velocity" > 240.0 AND Vehicle_Flight_number <> "M2-F1 #33" AND "company_id" <> 4 OR Date = "May 19, 1964"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 5 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT Name FROM employee WHERE "Age" <= 30 UNION SELECT Name FROM shop WHERE Location != "Valkeakoski" AND District = "Finnair Stadium" OR Manager_name != "Kai Nyyssönen" AND Name <> "KuPS" AND "Number_products" <= 6000 OR "Shop_ID" > 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 9 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT document_id FROM Document_Drafts WHERE draft_details = "w" AND "draft_number" = 10 AND "document_id" < 1 UNION SELECT document_id FROM Documents_Mailed WHERE mailing_date = "2007-01-01 22:32:11" OR "mailed_to_address_id" <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 5 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT staff_id FROM Lessons WHERE lesson_status_code <> "Cancelled" OR lesson_date != "2018-03-07 11:53:32" OR "lesson_id" = 3 AND lesson_time != "9" INTERSECT SELECT staff_id FROM Staff WHERE date_joined_staff = "2017-10-21 17:20:57"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2


Question: SELECT Pilot, Velocity, Altitude FROM flight WHERE Pilot != "Thompson" AND "company_id" <> 11 AND "id" < 13 EXCEPT SELECT Pilot, Velocity, Altitude FROM flight WHERE "Altitude" != 0.0 AND "company_id" = 2


Question: SELECT People_ID FROM people WHERE "Height" >= 207.0 UNION ALL SELECT People_ID FROM poker_player WHERE "Poker_Player_ID" > 1 AND "Money_Rank" = 154.0 OR "Best_Finish" <= 1.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT property_type_code FROM Properties WHERE apt_feature_2 <> "aut" AND "agreed_selling_price" = 3344706.5755 AND oth_feature_1 <> "None" OR other_property_details = "None" AND apt_feature_1 <> "aut" OR "vendor_requested_price" <> 1337.0 OR hse_feature_3 <> "None" AND property_address != "084 Lakin Vista Apt. 394 Fishertown, MA 16876" AND shp_feature_1 != "None" AND apt_feature_3 = "None" OR date_sold <> "1971-04-14 03:23:49" OR shp_feature_2 <> "None" AND hse_feature_2 = "None" AND hse_feature_1 = "None" OR shp_feature_3 != "None" AND "property_id" != 3 INTERSECT SELECT property_type_code FROM Ref_Property_Types WHERE property_type_description <> "Apartment, Flat, Condo, etc."


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 4


Question: SELECT rank, i_id FROM review WHERE "a_id" != 2 AND "i_id" <= 7 UNION ALL SELECT rank, i_id FROM review WHERE "i_id" != 1 OR "rating" > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 9 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 5


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2


Question: SELECT LName, Advisor, MAX(StuID), Major, city_code, Fname, AVG(Age), Sex FROM Student WHERE Sex <> "M" AND LName = "Nelson" AND "StuID" < 1001 OR "Advisor" >= 8722 OR "Major" = 600 AND "Age" >= 18 EXCEPT SELECT LName, Advisor, MAX(StuID), Major, city_code, Fname, AVG(Age), Sex FROM Student WHERE city_code <> "PIT" AND Sex != "F" OR Fname != "Tracy" OR "StuID" <= 1003 AND LName = "Han" OR "Major" < 600 AND "Advisor" <> 2311

LName Advisor MAX(StuID) Major city_code Fname AVG(Age) Sex


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 4 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 3


Question: SELECT Employee_ID FROM employee WHERE "Age" >= 29 AND City <> "Sale" UNION SELECT Employee_ID FROM hiring WHERE "Employee_ID" != 3 AND Start_from != "2010" OR Is_full_time = "T"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5


Question: SELECT Document_ID FROM Documents WHERE "Template_ID" <= 20 OR Document_Description = "h" AND "Document_ID" <> 3 EXCEPT SELECT Document_ID FROM Paragraphs WHERE "Paragraph_ID" != 1104059 AND "Document_ID" > 80 AND Paragraph_Text = "UK"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT aid FROM certificate WHERE "aid" < 1 AND "eid" < 567354612 UNION ALL SELECT aid FROM flight WHERE departure_date != "04/12/2005 08:45" AND destination <> "Los Angeles" AND origin <> "Los Angeles"


Question: SELECT Incorporated_in, id, Type, name, Principal_activities, Group_Equity_Shareholding FROM operate_company WHERE name = "China Pacific Laundry Services" OR "id" != 5 OR "Group_Equity_Shareholding" > 100.0 UNION SELECT Incorporated_in, id, Type, name, Principal_activities, Group_Equity_Shareholding FROM operate_company WHERE Incorporated_in <> "Hong Kong" OR "id" = 1 AND Type <> "Subsidiary" OR name = "CLS Catering Services Limited" OR "Group_Equity_Shareholding" >= 18.77

Canada
14
Joint Venture
CLS Catering Services Limited
Catering services
30.0

China
1
Corporate
Air China
Airline
18.77

China
2
Joint Venture
Air China Cargo
Cargo airline
49.0

Hong Kong
3
Joint Venture
Air Hong Kong
Cargo airline
60.0

Hong Kong
4
Subsidiary
Dragonair
Airline
100.0

Hong Kong
5
Subsidiary
Cathay Pacific Cargo
Cargo airline
100.0

Cathay Pacific Catering Services (HK) Limited

Hong Kong
7
Subsidiary
Cathay Pacific Services Limited
Cargo
100.0

Hong Kong
8
Subsidiary
Cathay Pacific Holidays
Travel agency
100.0

Hong Kong
9
Subsidiary
Dragonair Holidays
Travel agency
100.0

Hong Kong
10
Subsidiary
Hong Kong Airport Services
Ground handling
100.0

Hong Kong
11
Subsidiary
Vogue Laundry Service Limited
Laundry
100.0

Taiwan
12
Joint Venture
China Pacific Laundry Services
Laundry
45.0

Vietnam
13
Joint Venture
VN/CX Catering Services Limited
Catering services
40.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 1


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3


Question: SELECT StuID, PetID FROM Has_Pet WHERE "PetID" < 2002 OR "StuID" != 1001 EXCEPT SELECT StuID, PetID FROM Has_Pet WHERE "StuID" < 1001


Question: SELECT People_ID FROM employment WHERE "Year_working" <= 4 OR "Company_ID" = 15 AND "People_ID" = 1 UNION SELECT People_ID FROM people WHERE Nationality <> "United Kindom" AND Name <> "Reggie Lewis" AND "People_ID" <> 1 OR Graduation_College = "Virginia" AND "Age" != 34


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT MAX(staff_id), MAX(price), vehicle_id, lesson_status_code, AVG(lesson_date), customer_id, COUNT(lesson_id) FROM Lessons WHERE "staff_id" < 11 OR lesson_status_code <> "Cancelled" AND "price" <= 223.0 OR "lesson_id" <= 2 AND "customer_id" <= 8 OR lesson_time != "6" OR lesson_date <> "2018-02-28 10:55:36" AND "vehicle_id" <> 2 EXCEPT SELECT MAX(staff_id), MAX(price), vehicle_id, lesson_status_code, AVG(lesson_date), customer_id, COUNT(lesson_id) FROM Lessons WHERE "vehicle_id" >= 3 AND "price" <> 277.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 8 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT MAX(T1.Branch_ID), T2.Card_Number FROM branch as T1 JOIN member as T2 ON T1.Name = T2.Name WHERE City <> "London" OR Address_road = "Oaks Crescent" OR Branch_ID >= 2 AND AVG(Level) >= 2 AND Hometown = "Columbia, South Carolina" OR Open_year <> "2013" AND Card_Number <> "RE95"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 1


Question: SELECT Major, LName FROM Student WHERE LName != "Lee" AND Fname <> "Bruce" AND "Advisor" != 7712 AND "Major" <> 100 AND Sex <> "F" OR "Age" <= 19 AND city_code <> "HKG" UNION SELECT Major, LName FROM Student WHERE LName <> "Lee" OR Fname <> "Tracy" AND "Major" = 600 OR "StuID" < 1016 AND Sex = "M" AND city_code != "CHI" AND "Advisor" <> 7723


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 2 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2


Question: SELECT Store_ID FROM store WHERE Type = "Village Store" OR "Ranking" = 9 EXCEPT SELECT Store_ID FROM store_district WHERE "District_ID" != 11


Question: SELECT Big_Silver, MIN(Small_Silver), Bronze, Club_ID, Points FROM match_result WHERE "Bronze" = 7 OR "Rank" > 5 OR "Gold" >= 13 OR "Big_Silver" > 14 AND "Club_ID" = 5 AND "Small_Silver" = 9 UNION ALL SELECT Big_Silver, MIN(Small_Silver), Bronze, Club_ID, Points FROM match_result WHERE "Points" != 89 AND "Club_ID" != 2 OR "Bronze" > 10 OR "Rank" <> 4 OR "Big_Silver" <> 7 AND "Gold" <> 20 OR "Small_Silver" = 6


Question: SELECT document_id FROM Circulation_History WHERE "copy_number" >= 5 AND "document_id" != 10 AND "draft_number" > 1 UNION SELECT document_id FROM Documents WHERE other_details != "u" AND shipping_agent_code <> "US" OR receipt_number != "69"


Question: SELECT Party FROM election WHERE "District" <> 4 UNION SELECT Party FROM party WHERE "Party_ID" >= 2 AND Attorney_General <> "Eliot Spitzer" AND "Year" > 1998.0 OR Comptroller <> "Carl McCall" OR US_Senate = "Hillary Rodham Clinton" AND Lieutenant_Governor = "David Paterson" OR Party <> "Independence"


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2


Question: SELECT source_u_id FROM trust WHERE "trust" <= 1 OR "source_u_id" <> 1 INTERSECT SELECT source_u_id FROM trust WHERE "trust" < 10 OR "target_u_id" <> 6 OR "source_u_id" != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 3 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 3 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 4


Question: SELECT AVG(Branch_ID) FROM branch WHERE "Branch_ID" > 8 AND Name = "Zytogorski" AND Address_road != "Concord Road" AND membership_amount = "31" OR City != "London" EXCEPT SELECT AVG(Branch_ID) FROM purchase WHERE Year <> "2018" AND Branch_ID = "3" OR "Member_ID" < 1 AND "Total_pounds" <> 20.99


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 8 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Book_ID, Title, Issues, Writer FROM book WHERE Writer <> "Timothy Truman" AND "Issues" = 4.0 UNION ALL SELECT Book_ID, Title, Issues, Writer FROM book WHERE Title != "Sheva's War" OR "Issues" > 5.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 7 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT Allergy FROM Allergy_Type WHERE AllergyType = "animal" AND Allergy != "Eggs" UNION SELECT Allergy FROM Has_Allergy WHERE "StuID" = 1005


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 10 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT property_type_code FROM Properties WHERE shp_feature_3 != "None" AND date_on_market != "1978-05-15 10:53:37" OR property_address = "986 Hagenes Drives Draketon, UT 83411-3393" OR hse_feature_2 != "None" OR apt_feature_3 = "None" AND oth_feature_1 <> "None" OR apt_feature_1 = "quos" AND shp_feature_2 = "None" AND fld_feature_3 <> "None" OR fld_feature_2 <> "None" OR "vendor_requested_price" <= 1337.0 INTERSECT SELECT property_type_code FROM Ref_Property_Types WHERE property_type_code != "Shop" OR property_type_description = "Other, to be determined."


Question: SELECT District_ID FROM district WHERE "City_Area" <> 22.0 AND Headquartered_City = "Bhakkar City" AND District_name != "Jhang District" AND "City_Population" = 328512.0 UNION SELECT District_ID FROM store_district WHERE "District_ID" < 15 AND "Store_ID" > 2


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 12 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT School_ID, If_full_time, Driver_ID FROM school_bus WHERE If_full_time <> "T" AND "Years_Working" <= 2 AND "School_ID" <> 7 OR "Driver_ID" = 3 UNION ALL SELECT School_ID, If_full_time, Driver_ID FROM school_bus WHERE "School_ID" != 3 OR "Years_Working" <= 6 OR If_full_time <> "T"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT Name FROM branch WHERE Open_year <> "2015" AND Address_road <> "Oaks Crescent" OR "Branch_ID" < 5 OR membership_amount = "56" AND City = "London" AND Name <> "Taverner" EXCEPT SELECT Name FROM member WHERE Hometown != "Simpsonville, South Carolina" OR "Level" = 6


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT property_type_code FROM Properties WHERE fld_feature_1 <> "None" OR "property_id" = 13 AND date_on_market = "2003-12-25 16:13:19" OR fld_feature_3 = "None" OR apt_feature_2 <> "odio" OR fld_feature_2 <> "None" AND oth_feature_1 <> "None" AND shp_feature_1 <> "None" OR property_type_code = "Other" OR apt_feature_1 != "fuga" OR hse_feature_1 <> "None" AND hse_feature_3 <> "None" AND date_sold <> "1971-04-14 03:23:49" OR property_name = "avalon" AND "room_count" <= 7 OR "vendor_requested_price" <> 661536468.4429 AND property_address <> "098 Tremaine Highway Suite 569 South Wilford, NJ 46587-3537" AND oth_feature_2 = "None" AND shp_feature_2 = "None" OR "buyer_offered_price" >= 11375259.502 OR "agreed_selling_price" <> 456840888.16 OR shp_feature_3 <> "None" AND other_property_details <> "None" AND hse_feature_2 != "None" OR apt_feature_3 != "None" UNION ALL SELECT property_type_code FROM Ref_Property_Types WHERE property_type_code <> "Apartment" AND property_type_description = "House, Bungalow, etc."


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 8 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 7


Question: SELECT feature_type_code FROM Other_Available_Features WHERE feature_type_code = "Security" EXCEPT SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_code = "Amenity"


Question: SELECT customer_id FROM Customers WHERE first_name <> "Sigrid" OR "amount_outstanding" != 9443.0 OR date_became_customer != "2016-03-18 06:14:18" AND "customer_address_id" = 9 OR last_name <> "Schmeler" AND "customer_id" = 4 UNION ALL SELECT customer_id FROM Lessons WHERE "price" <= 492.0 AND "vehicle_id" != 2 AND "staff_id" <= 4 OR lesson_status_code != "Cancelled" OR "lesson_id" < 11 AND "customer_id" != 8 OR lesson_time <> "5" OR lesson_date <> "2018-03-07 11:53:32"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT first_name, COUNT(cell_mobile_phone_number), amount_outstanding, customer_id, date_became_customer, customer_address_id, AVG(last_name), SUM(date_of_birth) FROM Customers WHERE "amount_outstanding" > 9332.0 OR phone_number = "1-875-045-0806" AND email_address != "myrl.lind@example.net" OR first_name = "Jordy" AND last_name <> "Goodwin" OR date_of_birth != "1998-09-18 04:45:01" AND customer_status_code != "Bad Customer" OR date_became_customer = "2015-06-24 03:50:04" AND "customer_id" <= 13 AND cell_mobile_phone_number <> "1-387-258-1016x96963" OR "customer_address_id" <= 1 UNION ALL SELECT first_name, COUNT(cell_mobile_phone_number), amount_outstanding, customer_id, date_became_customer, customer_address_id, AVG(last_name), SUM(date_of_birth) FROM Customers WHERE date_became_customer = "2016-03-18 06:14:18" AND last_name != "Leuschke" AND phone_number = "1-618-535-9750" AND "customer_address_id" != 10 AND cell_mobile_phone_number != "1-401-108-8016x078" AND email_address != "karina.carroll@example.net" AND first_name <> "Marina" OR customer_status_code <> "Good Customer"


Question: SELECT customer_id, customer_status_code, phone_number, date_of_birth, AVG(date_became_customer), first_name, SUM(last_name), SUM(customer_address_id), cell_mobile_phone_number FROM Customers WHERE "amount_outstanding" <> 9500.0 EXCEPT SELECT customer_id, customer_status_code, phone_number, date_of_birth, AVG(date_became_customer), first_name, SUM(last_name), SUM(customer_address_id), cell_mobile_phone_number FROM Customers WHERE date_of_birth != "1998-12-15 13:24:40" AND "customer_address_id" < 1 AND first_name = "Genevieve" AND email_address = "nichole59@example.com" AND customer_status_code != "Bad Customer" OR last_name != "Ortiz" AND phone_number <> "(729)396-4354x3576" OR "amount_outstanding" != 2099.0


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 4 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 2 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 5


Question: SELECT T1.Age, T2.Driver_ID FROM driver as T1 JOIN school_bus as T2 ON T1.Driver_ID == T2.Driver_ID GROUP BY Party HAVING School_ID = 7 OR Name <> "Douglas McCrory" AND Years_Working <= 2 AND If_full_time = "T" OR Party = "Dem" OR Home_city <> "East Hartford" OR Age >= 42


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT MIN(Branch_ID) FROM branch WHERE Name != "Stanley" EXCEPT SELECT MIN(Branch_ID) FROM membership_register_branch WHERE "Member_ID" = 2 OR Register_Year <> "2016"


Question: SELECT Model, Maker FROM model_list WHERE "ModelId" != 26 UNION SELECT Model, Maker FROM model_list WHERE Model <> "buick"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 5 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT property_feature_description, property_id FROM Other_Property_Features WHERE "feature_id" != 4 OR property_feature_description = "corrupti" OR "property_id" > 15 INTERSECT SELECT property_feature_description, property_id FROM Other_Property_Features WHERE "property_id" <> 11


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 11 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT name, u_id FROM useracct WHERE name = "Terry" UNION ALL SELECT name, u_id FROM useracct WHERE name != "Roxi" OR "u_id" <= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT aid FROM certificate WHERE "eid" != 269734834 EXCEPT SELECT aid FROM flight WHERE departure_date = "04/12/2005 05:30"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 6 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 4 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 2


Question: SELECT MIN(property_type_code) FROM Properties WHERE shp_feature_2 = "None" AND oth_feature_3 = "None" EXCEPT SELECT MIN(property_type_code) FROM Ref_Property_Types WHERE property_type_description = "Other, to be determined." OR property_type_code != "Other"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT head_ID FROM head WHERE "head_ID" >= 3 UNION SELECT head_ID FROM management WHERE temporary_acting != "Yes"


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 5 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1


Question: SELECT AVG(Continent) FROM continents WHERE Continent <> "asia" INTERSECT SELECT AVG(Continent) FROM continents WHERE "ContId" <> 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT origin, MAX(arrival_date), departure_date, MIN(distance), aid, MIN(destination), AVG(price) FROM flight WHERE destination <> "Chicago" OR departure_date != "04/12/2005 09:15" OR "price" > 278.56 AND origin <> "Los Angeles" AND "flno" <> 33 AND "distance" < 2551 UNION ALL SELECT origin, MAX(arrival_date), departure_date, MIN(distance), aid, MIN(destination), AVG(price) FROM flight WHERE arrival_date != "04/12/2005 12:02" OR "price" = 220.98 AND destination = "Honolulu"

origin MAX(arrival_date) departure_date MIN(distance) aid MIN(destination) AVG(price)


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 4 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 1


Question: SELECT StuID FROM Member_of_club WHERE "ClubID" < 1 UNION ALL SELECT StuID FROM Student WHERE LName != "Goldman" AND Sex != "M" OR Fname != "Bruce" AND "Age" < 20 OR city_code = "BAL" OR "Advisor" <= 8772


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 1 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 9 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT aid, name, distance FROM aircraft WHERE "aid" > 6 UNION ALL SELECT aid, name, distance FROM aircraft WHERE "distance" >= 1530 OR name = "Boeing 757-300" AND "aid" != 6


Question: SELECT Type FROM school WHERE School = "State Elementary School Menteng 01" OR Location = "Los Angeles, California" UNION ALL SELECT Type FROM school WHERE Type <> "Private" OR "School_ID" = 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9