Question: SELECT Member_ID, Branch_ID FROM membership_register_branch WHERE Branch_ID <> "6" UNION SELECT Member_ID, Branch_ID FROM purchase WHERE "Member_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 <> 9


Question: SELECT name, SUM(distance) FROM aircraft WHERE name != "Airbus A340-300" OR "distance" = 30 GROUP BY name HAVING SUM(distance) <= 8430 UNION SELECT name, SUM(distance) FROM aircraft WHERE "distance" <= 6475 AND "aid" = 8 AND name <> "British Aerospace Jetstream 41" GROUP BY name HAVING SUM(distance) <> 4103


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 >= 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 <> 4 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 != 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 2


Question: SELECT document_id, draft_number FROM Circulation_History WHERE "draft_number" < 20 UNION SELECT document_id, draft_number FROM Document_Drafts WHERE "draft_number" > 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 != 3


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 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 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 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 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 <> 7 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 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 <> 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT Party, Party_ID, Lieutenant_Governor FROM party WHERE Party != "Working Families" AND US_Senate <> "Charles Schumer" OR Governor = "Betsy McCaughey Ross" AND Comptroller <> "Alan Hevesi" AND Lieutenant_Governor = "Sandra Frankel" UNION SELECT Party, Party_ID, Lieutenant_Governor FROM party WHERE Lieutenant_Governor = "David Paterson" OR "Year" > 2002.0 AND Party = "Working Families" OR Governor = "Betsy McCaughey Ross"


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 document_id FROM Document_Drafts WHERE draft_details = "m" OR "draft_number" != 19 AND "document_id" > 17 UNION ALL SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" != 5 AND "document_id" != 12


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 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 >= 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 >= 3 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 = 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 = 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 <= 10


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 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 ContId, Continent FROM continents WHERE "ContId" < 2 UNION SELECT ContId, Continent FROM continents WHERE "ContId" < 1 AND Continent = "asia"


Question: SELECT AVG(Club_name), AVG(Start_year), Region FROM club WHERE "Start_year" < 2001 AND Region = "France" UNION SELECT AVG(Club_name), AVG(Start_year), Region FROM club WHERE "Start_year" <= 2009 OR "Club_ID" >= 5 OR Region <> "Korea" AND Club_name != "BK Häcken"


Question: SELECT property_id, property_feature_description FROM Other_Property_Features WHERE property_feature_description <> "dolorem" UNION SELECT property_id, property_feature_description FROM Other_Property_Features WHERE "feature_id" = 2 OR property_feature_description != "corrupti"


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 Template_Type_Description, Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Description <> "Book" UNION SELECT Template_Type_Description, Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Description <> "Advertisement" OR Template_Type_Code != "AD"


Question: SELECT Max_Gross_Weight FROM aircraft WHERE Total_disk_area != "872 ft² (81.1 m²)" OR Max_Gross_Weight <> "50,000 lb (22,680 kg)" AND Aircraft != "Robinson R-22" OR Description <> "Heavy-lift helicopter" OR Max_disk_Loading = "2.6 lb/ft² (14 kg/m²)" OR "Aircraft_ID" <> 3 UNION SELECT Max_Gross_Weight FROM aircraft WHERE Max_Gross_Weight <> "1,370 lb (635 kg)" AND Max_disk_Loading = "8.8 lb/ft² (43 kg/m²)" OR Description != "Tandem rotor helicopter" OR "Aircraft_ID" > 5


Question: SELECT COUNT(Sex), SUM(Fname), MAX(LName), city_code, Age, StuID, Major FROM Student WHERE city_code <> "ROC" OR "Age" > 18 AND "StuID" < 1012 AND Sex <> "M" OR LName != "Prater" UNION SELECT COUNT(Sex), SUM(Fname), MAX(LName), city_code, Age, StuID, Major FROM Student WHERE "StuID" < 1019 AND Sex = "M"

COUNT(Sex) SUM(Fname) MAX(LName) city_code Age StuID Major


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 Template_ID FROM Documents WHERE Document_Description != "y" AND Other_Details = "None" OR "Document_ID" <= 801801 OR Document_Name = "Data base" AND "Template_ID" != 8 UNION ALL SELECT Template_ID FROM Templates WHERE Template_Details = "" OR Date_Effective_From = "2005-02-20 00:31:34" AND Date_Effective_To = "2008-01-05 14:19:28" AND "Version_Number" != 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 != 2


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 <= 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 >= 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 10


Question: SELECT Book_ID, Price, Publisher, Publication_Date, Publication_ID FROM publication WHERE "Publication_ID" <> 7 OR "Book_ID" <> 3 OR Publication_Date != "April 2007" UNION SELECT Book_ID, Price, Publisher, Publication_Date, Publication_ID FROM publication WHERE "Price" != 3000000.0 AND Publisher <> "Wiley"


Question: SELECT Address_road, City, membership_amount FROM branch WHERE Address_road <> "Valleys Place" AND "Branch_ID" >= 5 INTERSECT SELECT Address_road, City, membership_amount FROM branch WHERE Address_road != "Abbott Street" OR "Branch_ID" = 4 OR Name != "Brooke Greville"


Question: SELECT id FROM albums WHERE "id" <= 93 UNION SELECT id FROM media_types WHERE name <> "AAC audio file"


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 = 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT Aircraft, Description, SUM(Max_disk_Loading), MIN(Total_disk_area), Max_Gross_Weight FROM aircraft WHERE Max_Gross_Weight <> "1,370 lb (635 kg)" AND Total_disk_area <> "5,655 ft² (526 m²)" EXCEPT SELECT Aircraft, Description, SUM(Max_disk_Loading), MIN(Total_disk_area), Max_Gross_Weight FROM aircraft WHERE Total_disk_area <> "8,495 ft² (789 m²)" AND "Aircraft_ID" >= 4 OR Max_disk_Loading != "3.7 lb/ft² (18 kg/m²)" OR Max_Gross_Weight != "73,500 lb (33,300 kg)" OR Description != "Heavy-lift helicopter" OR Aircraft <> "Bell 206B3 JetRanger"

CH-53E Super Stallion
Heavy-lift helicopter
33.2
4,900 ft² (460 m²)
73,500 lb (33,300 kg)


Question: SELECT Continent, MIN(CountryName), CountryId FROM countries WHERE CountryName != "australia" OR "Continent" <= 1 UNION SELECT Continent, MIN(CountryName), CountryId FROM countries WHERE "CountryId" < 3 OR CountryName <> "italy"


Question: SELECT School_ID FROM school WHERE Location != "New York City" OR Grade = "4th grade" OR Type <> "Private Catholic" OR "School_ID" <= 3 AND School != "Punahou School" EXCEPT SELECT School_ID FROM school_bus WHERE "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 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 >= 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT feature_id FROM Other_Available_Features WHERE "feature_id" >= 2 OR feature_type_code <> "Security" AND feature_name = "AirCon" OR feature_description != "Air Conditioning." UNION ALL SELECT feature_id FROM Other_Property_Features WHERE property_feature_description != "odio" AND "property_id" <> 15


Question: SELECT Player_ID FROM player WHERE Sponsor_name <> "Charleswood—St. James—Assiniboia" OR Occupation = "Parliamentarian" AND Rank <> "2nd" AND "Votes" = 8734 OR Residence != "Birtle" INTERSECT SELECT Player_ID FROM player_coach WHERE "Coach_ID" >= 1


Question: SELECT contestant_name, contestant_number FROM CONTESTANTS WHERE "contestant_number" >= 11 UNION SELECT contestant_name, contestant_number FROM CONTESTANTS WHERE "contestant_number" > 6 AND contestant_name = "Loraine NygrenTania Mattioli"


Question: SELECT property_type_code FROM Properties WHERE hse_feature_2 != "None" OR fld_feature_2 != "None" OR hse_feature_3 <> "None" OR property_name = "high line" AND "buyer_offered_price" <> 3520911.5258 OR apt_feature_1 = "fuga" AND property_address = "60845 Else Highway Apt. 826 South Dougfort, CO 43200-4258" AND fld_feature_1 = "None" AND property_type_code != "House" AND oth_feature_3 = "None" AND fld_feature_3 = "None" OR shp_feature_3 <> "None" AND other_property_details <> "None" EXCEPT SELECT property_type_code FROM Ref_Property_Types WHERE property_type_code = "Other" AND property_type_description <> "Apartment, Flat, Condo, etc."


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 <> 7 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 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 <> 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 3


Question: SELECT COUNT(id) FROM albums WHERE "artist_id" != 90 OR title <> "A TempestadeTempestade Ou O Livro Dos Dias" EXCEPT SELECT COUNT(id) FROM genres WHERE name = "Blues"


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 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 document_id FROM Documents_Mailed WHERE "document_id" >= 12 AND mailing_date <> "1979-09-21 10:30:52" AND "mailed_to_address_id" > 3 EXCEPT SELECT document_id FROM Draft_Copies WHERE "document_id" < 23


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 < 2 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 > 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 < 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 > 5 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 = 3


Question: SELECT employee_id, copy_number FROM Circulation_History WHERE "document_id" = 1 OR "employee_id" < 2 AND "draft_number" <= 1 EXCEPT SELECT employee_id, copy_number FROM Circulation_History WHERE "document_id" = 2


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 < 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT Ranking, MAX(Creation) FROM department WHERE "Department_ID" <> 12 EXCEPT SELECT Ranking, MAX(Creation) FROM department WHERE "Budget_in_Billions" <> 11.1 AND Creation = "1989" AND "Department_ID" != 8 AND "Num_Employees" != 71436.0 OR Name = "State"


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 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 != 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 3


Question: SELECT draft_number FROM Document_Drafts WHERE draft_details <> "k" UNION ALL SELECT draft_number FROM Draft_Copies WHERE "document_id" >= 2 AND "draft_number" > 17 OR "copy_number" <> 15


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 Years_Working FROM school_bus WHERE "Years_Working" >= 2 UNION ALL SELECT Years_Working FROM school_bus WHERE "School_ID" = 5 AND If_full_time <> "T"


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 <= 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT People_ID FROM people WHERE Name = "Semen Poltavskiy" OR "People_ID" <> 3 OR "Height" != 207.0 AND Birth_Date <> "July 14, 1983" UNION SELECT People_ID FROM poker_player WHERE "Poker_Player_ID" >= 5 OR "People_ID" != 5 OR "Money_Rank" < 166.0 AND "Best_Finish" < 1.0


Question: SELECT Club_ID FROM club WHERE "Start_year" >= 2005 OR Club_name <> "BK Häcken" UNION ALL SELECT Club_ID FROM match_result WHERE "Small_Silver" >= 10 OR "Points" < 102 OR "Bronze" <= 9 OR "Gold" <> 13 AND "Club_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 <= 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 SUM(Store_ID) FROM store WHERE Type = "City Mall" OR "Ranking" < 10 AND "Area_size" >= 28.74 AND Store_Name <> "Miramichi" OR "Number_of_product_category" != 17811.0 OR "Store_ID" != 4 EXCEPT SELECT SUM(Store_ID) FROM store_product WHERE "Product_ID" <= 1 AND "Store_ID" <= 1


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 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 != 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 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 7


Question: SELECT u_id FROM review WHERE "i_id" >= 7 OR "rating" != 6 AND "a_id" < 4 UNION SELECT u_id FROM useracct WHERE name != "Nancy"


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 <= 5


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 = 9


Question: SELECT MIN(other_details) FROM Documents WHERE shipping_agent_code != "UP" AND receipt_number <> "61" UNION ALL SELECT MIN(other_details) FROM Employees WHERE role_code = "PT" OR other_details != "v"


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 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 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 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 <= 10 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


Question: SELECT Store_ID FROM store WHERE "Store_ID" >= 2 AND Store_Name != "Blackville" OR "Ranking" >= 10 OR Type != "City Mall" UNION ALL SELECT Store_ID FROM store_district WHERE "District_ID" > 11


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 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 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 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 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1


Question: SELECT Area_size, Number_of_product_category, Ranking, Store_Name, Type FROM store WHERE Store_Name != "Rogersville" UNION ALL SELECT Area_size, Number_of_product_category, Ranking, Store_Name, Type FROM store WHERE "Area_size" <> 7.23 AND "Ranking" <> 10 OR "Number_of_product_category" > 1678.0


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 != 10


Question: SELECT MAX(Earnings), SUM(People_ID) FROM poker_player WHERE "Poker_Player_ID" <= 3 OR "Final_Table_Made" <> 26.0 UNION ALL SELECT MAX(Earnings), SUM(People_ID) FROM poker_player WHERE "Final_Table_Made" = 26.0 AND "People_ID" <= 5 AND "Money_Rank" <= 154.0 OR "Poker_Player_ID" <= 2


Question: SELECT MIN(other_details) FROM Documents WHERE receipt_number != "19" INTERSECT SELECT MIN(other_details) FROM Employees WHERE employee_name != "Koby" OR other_details <> "f"


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 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 > 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 >= 5 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 <> 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 != 9


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 >= 10


Question: SELECT employee_id FROM Circulation_History WHERE "copy_number" >= 5 AND "document_id" != 20 OR "employee_id" > 8 UNION ALL SELECT employee_id FROM Employees WHERE other_details != "f" AND "employee_id" > 5 OR employee_name <> "Haley" OR role_code <> "MG"


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 MIN(Store_ID) FROM store_district WHERE "Store_ID" < 5 UNION SELECT MIN(Store_ID) FROM store_product WHERE "Product_ID" <= 1 OR "Store_ID" = 2


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 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 aid FROM certificate WHERE "eid" >= 355548984 UNION ALL SELECT aid FROM flight WHERE origin <> "Los Angeles" OR departure_date != "04/12/2005 09:30" AND "flno" <> 387 AND arrival_date != "04/12/2005 10:03" OR "distance" <> 2551 OR destination = "Boston" AND "aid" < 2 AND "price" > 425.98


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 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 >= 5 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 >= 8 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 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3


Question: SELECT SUM(School_id) FROM budget WHERE "Invested" > 95542 OR "School_id" <> 2 AND "Year" <= 2005 OR "Budgeted" <= 61283 EXCEPT SELECT SUM(School_id) FROM endowment WHERE "endowment_id" < 11 AND "amount" <= 8.82 OR "School_id" <= 3


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 >= 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 < 11 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 <= 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT StuID FROM Has_Allergy WHERE Allergy = "Nuts" AND "StuID" <= 1005 INTERSECT SELECT StuID FROM Student WHERE Sex <> "F" OR "Age" = 17 OR LName <> "Prater" AND city_code != "PIT" OR "Major" < 550 OR "StuID" < 1024 OR "Advisor" <> 7712


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_status_code) FROM Documents WHERE "document_id" >= 20 AND document_type_code != "CD" AND shipping_agent_code != "SH" AND other_details != "u" OR document_status_code = "overdue" AND receipt_number = "69" INTERSECT SELECT MIN(document_status_code) FROM Ref_Document_Status WHERE document_status_code = "overdue"


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 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 3


Question: SELECT COUNT(vehicle_id) FROM Vehicles WHERE "vehicle_id" <= 1 OR vehicle_details <> "Van" UNION ALL SELECT COUNT(vehicle_id) FROM Vehicles WHERE "vehicle_id" <= 3 AND vehicle_details <> "Truck"


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 > 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 = 1


Question: SELECT document_id FROM Circulation_History WHERE "document_id" <> 10 AND "copy_number" = 15 AND "employee_id" <> 8 OR "draft_number" <> 20 INTERSECT SELECT document_id FROM Documents WHERE document_type_code = "Paper"


Question: SELECT property_feature_description, feature_id FROM Other_Property_Features WHERE "property_id" >= 4 OR "feature_id" != 4 AND property_feature_description != "quo" UNION SELECT property_feature_description, feature_id FROM Other_Property_Features WHERE "property_id" <= 7 AND "feature_id" >= 4 AND property_feature_description = "vitae"


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 <= 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT property_type_description FROM Ref_Property_Types WHERE property_type_code != "Field" INTERSECT SELECT property_type_description 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 <= 1 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 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 1


Question: SELECT feature_type_code FROM Other_Available_Features WHERE feature_name != "AirCon" AND feature_description != "Swimming Pool." UNION SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_code <> "Amenity" OR feature_type_name = "Amenity, eg Pool."


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 >= 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 <> 5


Question: SELECT document_status_code FROM Ref_Document_Status WHERE document_status_description != "mailed late" OR document_status_code <> "working" UNION SELECT document_status_code FROM Ref_Document_Status WHERE document_status_description <> "currently working on" OR document_status_code = "done"


Question: SELECT County_Id, County_name, Population, Zip_code FROM county WHERE "County_Id" < 4 AND "Population" != 90000.0 OR County_name != "Baltimore County" INTERSECT SELECT County_Id, County_name, Population, Zip_code FROM county WHERE "County_Id" < 1 OR Zip_code = "D02"


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 <> 2 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 >= 10 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 = 4 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 <= 7 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 > 7 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 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 = 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 < 3


Question: SELECT document_status_code FROM Documents WHERE shipping_agent_code = "SH" UNION SELECT document_status_code FROM Ref_Document_Status WHERE document_status_description <> "mailed late" AND document_status_code = "working"


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 > 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 10


Question: SELECT date_left_staff, staff_address_id, nickname FROM Staff WHERE nickname != "bkunze" EXCEPT SELECT date_left_staff, staff_address_id, nickname FROM Staff WHERE middle_name <> "Madelyn"


Question: SELECT AVG(feature_id) FROM Other_Available_Features WHERE feature_description <> "Burglar Alarm" OR "feature_id" = 4 UNION SELECT AVG(feature_id) FROM Other_Property_Features WHERE "property_id" = 6


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 != 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 <> 10


Question: SELECT MIN(Document_Name), MIN(Template_ID), Other_Details, Document_ID, Document_Description FROM Documents WHERE "Template_ID" != 22 OR Other_Details <> "None" OR Document_Name <> "How Google people work" AND "Document_ID" <> 33930 UNION ALL SELECT MIN(Document_Name), MIN(Template_ID), Other_Details, Document_ID, Document_Description FROM Documents WHERE "Document_ID" = 2394 OR "Template_ID" = 10 AND Other_Details = "None" OR Document_Description <> "y"


Question: SELECT StuID FROM Member_of_club WHERE "ClubID" <= 1 AND "StuID" != 1010 INTERSECT SELECT StuID FROM Student WHERE "Major" >= 600 OR Fname <> "David" AND Sex = "M" OR "StuID" <> 1005


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 < 7


Question: SELECT role_code FROM Employees WHERE other_details <> "h" OR role_code = "PR" UNION SELECT role_code FROM Roles WHERE role_code = "PT" OR role_description = "Manager"


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 Employee_ID, Age, Name, City FROM employee WHERE "Employee_ID" >= 8 OR "Age" != 43 OR City = "Bristol" EXCEPT SELECT Employee_ID, Age, Name, City FROM employee WHERE Name <> "Louis Deacon" AND City <> "Wasps" AND "Employee_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 <> 3


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 Template_Type_Description, Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Code <> "PP" OR Template_Type_Description <> "Presentation" INTERSECT SELECT Template_Type_Description, Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Description != "Advertisement" OR Template_Type_Code <> "AD"


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 <> 5 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 < 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 < 4 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 >= 2


Question: SELECT COUNT(rank), u_id, MAX(a_id), COUNT(i_id) FROM review WHERE "u_id" <> 2 AND "rating" <= 7 UNION SELECT COUNT(rank), u_id, MAX(a_id), COUNT(i_id) FROM review WHERE "u_id" != 2 OR "i_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 != 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 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 >= 10


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 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 <> 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 4


Question: SELECT Allergy FROM Allergy_Type WHERE Allergy <> "Dog" OR AllergyType = "animal" INTERSECT SELECT Allergy FROM Allergy_Type WHERE AllergyType <> "animal"


Question: SELECT MAX(aid), SUM(distance) FROM aircraft WHERE name = "Tupolev 154" OR "aid" <= 16 UNION ALL SELECT MAX(aid), SUM(distance) FROM flight WHERE "price" = 220.98 OR "aid" <= 9 AND destination != "New York" AND arrival_date != "04/12/2005 08:45" AND departure_date != "04/12/2005 07:03" AND "flno" >= 13 AND "distance" = 7487


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 != 4 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 != 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 <> 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 <> 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 >= 8 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 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 <> 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 10


Question: SELECT shipping_agent_code FROM Documents WHERE receipt_number <> "80" OR shipping_agent_code = "UP" OR document_type_code = "Paper" AND "document_id" != 4 AND receipt_date != "1996-05-31 06:51:58" UNION ALL SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_code <> "FE" OR shipping_agent_description = "t"


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 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 = 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT MIN(T1.i_id), T2.i_id FROM item as T1 JOIN review as T2 ON T1.i_id = T2.i_id WHERE "a_id" > 3 AND "u_id" = 1 AND title = "blue hoodie" OR "rank" > 6


Question: SELECT id, title FROM albums WHERE title = "Chronicle, Vol. 1" EXCEPT SELECT id, title FROM employees WHERE city <> "Lethbridge"


Question: SELECT COUNT(Allergy) FROM Allergy_Type WHERE AllergyType = "food" UNION SELECT COUNT(Allergy) FROM Has_Allergy WHERE Allergy != "Anchovies" AND "StuID" >= 1004


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 District_ID FROM district WHERE "City_Area" <= 75.0 OR Headquartered_City = "Kasur City" OR "District_ID" > 9 OR District_name = "Bahawalpur District" AND "City_Population" <> 89380.0 UNION ALL SELECT District_ID FROM store_district WHERE "Store_ID" != 1


Question: SELECT Maker, ModelId FROM model_list WHERE Model = "renault" OR "Maker" <= 20 UNION SELECT Maker, ModelId FROM model_list WHERE "Maker" >= 21 AND "ModelId" >= 25 AND Model = "buick"


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 SUM(T1.ClubID), T2.StuID FROM Club as T1 JOIN Member_of_club as T2 ON T1.ClubID = T2.ClubID WHERE Position = "President" AND ClubName <> "Hopkins Student Enterprises" GROUP BY ClubName HAVING ClubDesc <> "Refurbish computers; teach kids and adults about computer basics." AND Position = "President" OR StuID <= 1007


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 >= 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 != 3


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 != 7 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 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 <> 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 <> 3 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <= 1


Question: SELECT School_id FROM budget WHERE "Year" <= 2006 OR "total_budget_percent_budgeted" < 2.0 OR "Budgeted" <> 6803 AND "School_id" <> 1 OR "Invested" > 2134 OR "total_budget_percent_invested" <> 2.0 EXCEPT SELECT School_id FROM endowment WHERE donator_name = "Monte Plata"


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 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 MIN(document_id) FROM Circulation_History WHERE "document_id" < 10 OR "draft_number" < 2 EXCEPT SELECT MIN(document_id) FROM Documents_Mailed WHERE "mailed_to_address_id" != 9 AND "document_id" = 12


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 id FROM flight WHERE "id" < 2 OR Pilot <> "Peterson" OR Date != "November 8, 1963" AND "Velocity" < 240.0 AND Vehicle_Flight_number <> "M2-F1 #21" AND "airport_id" != 4 OR "company_id" != 9 UNION SELECT id FROM operate_company WHERE "id" <= 8 AND Incorporated_in <> "Hong Kong" AND name = "Hong Kong Airport Services" AND "Group_Equity_Shareholding" = 100.0 AND Principal_activities != "Catering services" AND Type != "Joint Venture"


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 <> 3 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 <= 9 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 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 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 <= 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 > 12 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 <> 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 <= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT T1.i_id, T2.a_id FROM item as T1 JOIN review as T2 ON T1.i_id == T2.i_id GROUP BY rank HAVING a_id <> 5 OR u_id <= 2 AND title <> "pear"


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 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 Store_ID FROM store WHERE "Ranking" <= 1 AND "Area_size" = 7.23 AND "Number_of_product_category" < 793.0 OR "Store_ID" <> 1 EXCEPT SELECT Store_ID FROM store_district WHERE "Store_ID" > 2 OR "District_ID" < 15


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 id FROM albums WHERE "artist_id" = 153 AND title <> "Appetite for Destruction" OR "id" <> 44 UNION ALL SELECT id FROM playlists WHERE name = "Music"


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 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 <= 9


Question: SELECT Allergy FROM Allergy_Type WHERE AllergyType = "food" AND Allergy = "Shellfish" UNION SELECT Allergy FROM Has_Allergy WHERE "StuID" <> 1023


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 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT AVG(Region), MAX(Start_year), Club_name, Club_ID FROM club WHERE Region = "Korea" AND "Start_year" > 1998 UNION SELECT AVG(Region), MAX(Start_year), Club_name, Club_ID FROM club WHERE Region <> "France"


Question: SELECT feature_type_code FROM Other_Available_Features WHERE "feature_id" = 4 AND feature_description != "Swimming Pool." UNION SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_name <> "Amenity, eg Pool." AND feature_type_code != "Amenity"


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 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 <= 9


Question: SELECT SUM(customer_id) FROM Customers WHERE last_name = "Bernhard" OR email_address = "kitty.hand@example.net" OR cell_mobile_phone_number != "(780)719-4206x033" OR "amount_outstanding" > 3900.0 EXCEPT SELECT SUM(customer_id) FROM Lessons WHERE lesson_time = "9" OR lesson_date <> "2018-03-07 16:12:36" AND "customer_id" = 11 OR "lesson_id" <= 3 OR "vehicle_id" < 2 OR lesson_status_code <> "Cancelled" OR "price" <> 495.0


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 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 MIN(Employee_ID) FROM evaluation WHERE Year_awarded != "2017" EXCEPT SELECT MIN(Employee_ID) FROM hiring WHERE "Shop_ID" = 5 OR "Employee_ID" <> 5 OR Is_full_time = "T"


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 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 != 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 <> 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 <> 3


Question: SELECT COUNT(property_id) FROM Other_Property_Features WHERE "feature_id" < 2 UNION ALL SELECT COUNT(property_id) FROM Properties WHERE oth_feature_3 <> "None" AND "vendor_requested_price" > 13.4715 AND fld_feature_1 != "None" OR date_on_market = "2016-05-06 16:53:39" OR oth_feature_2 != "None" AND fld_feature_2 = "None" AND shp_feature_2 != "None"


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 <= 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 < 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 != 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


Question: SELECT Other_Details FROM Documents WHERE "Document_ID" != 801801 OR "Template_ID" <> 11 OR Document_Name <> "Summer Show" UNION SELECT Other_Details FROM Paragraphs WHERE "Paragraph_ID" = 7 AND "Document_ID" != 3830 OR Paragraph_Text != "Japan"


Question: SELECT AllergyType FROM Allergy_Type WHERE AllergyType = "food" NOT IN (SELECT AllergyType FROM Allergy_Type WHERE AllergyType <> "food")


Question: SELECT id FROM albums WHERE "artist_id" = 90 EXCEPT SELECT id FROM genres WHERE "id" <= 16


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 = 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 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 Shop_ID FROM hiring WHERE Start_from != "2003" UNION SELECT Shop_ID FROM shop WHERE Name = "FF Jaro" AND District = "Magnum Areena" OR "Number_products" < 10000 OR "Shop_ID" > 6 OR Manager_name != "Ilkka Mäkelä"


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 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 10


Question: SELECT Name, Sales_in_Billion FROM company WHERE "Assets_in_Billion" <> 2265.8 UNION SELECT Name, Sales_in_Billion FROM company WHERE Name <> "Volkswagen Group" OR Industry = "Oil and gas" AND "Sales_in_Billion" <= 216.2 AND "Profits_in_Billion" < 15.9


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 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 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 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 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 SUM(People_ID) FROM people WHERE Nationality = "Russia" OR Name != "Semen Poltavskiy" OR "Height" != 182.0 OR "People_ID" >= 7 AND Birth_Date != "August 16, 1982" UNION ALL SELECT SUM(People_ID) FROM poker_player WHERE "Money_Rank" = 58.0 OR "Poker_Player_ID" != 3 OR "Best_Finish" = 1.0 OR "Earnings" = 476090.0 AND "People_ID" <= 6 AND "Final_Table_Made" <= 21.0


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 document_type_code, document_type_description FROM Ref_Document_Types WHERE document_type_code <> "Paper" AND document_type_description <> "u" UNION ALL SELECT document_type_code, document_type_description FROM Ref_Document_Types WHERE document_type_description = "u"


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 Member_ID, Branch_ID FROM membership_register_branch WHERE "Member_ID" != 4 INTERSECT SELECT Member_ID, Branch_ID FROM membership_register_branch WHERE Register_Year <> "2016"


Question: SELECT MAX(u_id) FROM review WHERE "a_id" <= 1 OR "i_id" <> 7 OR "rating" = 5 EXCEPT SELECT MAX(u_id) FROM useracct WHERE name <> "Emily" AND "u_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 = 4


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 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 Product_ID FROM store_product WHERE "Store_ID" = 3 UNION ALL SELECT Product_ID FROM store_product WHERE "Store_ID" = 5


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 document_id FROM Document_Drafts WHERE "document_id" <> 23 EXCEPT SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" = 5 AND mailing_date <> "1971-11-03 12:32:14"


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 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 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 != 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 7


Question: SELECT state FROM AREA_CODE_STATE WHERE "area_code" >= 504 UNION ALL SELECT state FROM VOTES WHERE created = "2018-03-09 19:03:36" AND "vote_id" <> 3 AND state != "CA" AND "phone_number" < 6209222712 AND "contestant_number" <= 2


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 <= 1


Question: SELECT COUNT(document_id) FROM Circulation_History WHERE "employee_id" > 1 OR "draft_number" < 1 AND "copy_number" < 10 OR "document_id" >= 1 EXCEPT SELECT COUNT(document_id) FROM Draft_Copies WHERE "document_id" <> 20


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 >= 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 <> 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


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 < 5 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 10


Question: SELECT contestant_number FROM CONTESTANTS WHERE "contestant_number" > 8 EXCEPT SELECT contestant_number FROM VOTES WHERE "vote_id" >= 2 OR state <> "CA" AND "contestant_number" < 2 OR "phone_number" <= 5112677315


Question: SELECT id FROM albums WHERE "id" >= 217 OR title <> "Fear Of The Dark" UNION SELECT id FROM playlists WHERE "id" = 12


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 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 > 8 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT document_type_code FROM Ref_Document_Types WHERE document_type_description != "f" UNION SELECT document_type_code FROM Ref_Document_Types WHERE document_type_description <> "f"


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 < 10 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 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 <> 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 >= 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 3


Question: SELECT Type FROM school WHERE School != "Occidental College" INTERSECT SELECT Type FROM school WHERE "School_ID" <= 2 OR School != "Harvard Law School"


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 Employee_ID, Bonus FROM evaluation WHERE "Bonus" >= 2900.0 AND Year_awarded = "2016" UNION ALL SELECT Employee_ID, Bonus FROM evaluation WHERE "Bonus" = 2900.0


Question: SELECT SUM(Company_ID), AVG(Year_working) FROM employment WHERE "People_ID" > 2 AND "Company_ID" >= 13 AND "Year_working" <= 3 UNION ALL SELECT SUM(Company_ID), AVG(Year_working) FROM employment WHERE "Company_ID" >= 15


Question: SELECT id FROM flight WHERE Vehicle_Flight_number = "M2-F1 #64" AND "id" > 2 OR "Velocity" < 240.0 OR "airport_id" <= 4 INTERSECT SELECT id FROM operate_company WHERE Principal_activities != "Airline" OR name != "Cathay Pacific Cargo" AND "Group_Equity_Shareholding" < 100.0 AND "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 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 state FROM AREA_CODE_STATE WHERE "area_code" <= 979 AND state <> "CA" INTERSECT SELECT state FROM VOTES WHERE "phone_number" = 7182887233 OR state <> "NJ "


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 > 5 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 >= 2


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 <> 12 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 != 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 3


Question: SELECT id FROM albums WHERE "artist_id" <> 127 AND "id" <> 117 OR title = "BBC Sessions [Disc 1] live" UNION ALL SELECT id FROM playlists WHERE name = "Audiobooks"


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 != 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 9


Question: SELECT Company_ID FROM employment WHERE "Year_working" <= 2 UNION SELECT Company_ID FROM employment WHERE "People_ID" < 4 AND "Company_ID" >= 17 AND "Year_working" != 1


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 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 document_id, copy_number, draft_number FROM Circulation_History WHERE "document_id" <= 20 AND "draft_number" > 2 OR "employee_id" <= 1 AND "copy_number" != 4 UNION ALL SELECT document_id, copy_number, draft_number FROM Draft_Copies WHERE "document_id" > 1 AND "draft_number" != 9 OR "copy_number" <> 10


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 <> 7


Question: SELECT T1.Aircraft_ID, AVG(T2.Aircraft_ID) FROM aircraft as T1 JOIN airport_aircraft as T2 ON T1.Aircraft_ID = T2.Aircraft_ID


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 <> 2 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT aid, distance, arrival_date FROM flight WHERE "aid" > 3 AND arrival_date = "04/12/2005 12:02" OR "distance" = 1251 OR "flno" <= 2 OR destination = "Washington D.C." AND "price" != 261.56 OR departure_date = "04/12/2005 06:30" EXCEPT SELECT aid, distance, arrival_date FROM flight WHERE "flno" <> 34 AND "aid" >= 5 OR "price" > 375.23 AND destination <> "Washington D.C." AND arrival_date != "04/12/2005 08:45" AND departure_date <> "04/12/2005 07:03" AND origin = "Los Angeles"


Question: SELECT COUNT(T1.Market_Value_in_Billion), T2.People_ID FROM company as T1 JOIN employment as T2 ON T1.Company_ID = T2.Company_ID WHERE "Market_Value_in_Billion" <= 213.7 OR Name = "Industrial and Commercial Bank of China" OR "Profits_in_Billion" <> 20.1 AND Industry <> "Conglomerate" OR "Assets_in_Billion" = 1563.9 AND "Year_working" <= 1 OR "People_ID" > 3 OR "Sales_in_Billion" = 447.0 OR Headquarters <> "China"


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 >= 5 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 != 12 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 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 distance, aid FROM aircraft WHERE name <> "Boeing 757-300" OR "aid" >= 14 OR "distance" < 1502 UNION SELECT distance, aid FROM flight WHERE origin != "Chicago" OR "distance" >= 1251 AND destination = "Sydney" OR "aid" >= 1 OR departure_date != "04/12/2005 07:03"


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 <> 4


Question: SELECT shipping_agent_description, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name <> "UPS" OR shipping_agent_description = "k" AND shipping_agent_code != "US" UNION ALL SELECT shipping_agent_description, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_code = "US" OR shipping_agent_description != "q" AND shipping_agent_name = "USPS"


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 Coach_ID FROM coach WHERE "Rank" != 5 UNION SELECT Coach_ID FROM player_coach WHERE "Starting_year" > 2012


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 <= 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 >= 9 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT Age, Major FROM Student WHERE "Major" = 550 OR Fname != "Arthur" OR "StuID" <= 1022 AND Sex != "M" OR city_code <> "BAL" UNION SELECT Age, Major FROM Student WHERE "Age" <= 19 OR "Major" <= 100 AND city_code = "ROC" OR LName <> "Lee" AND "Advisor" <> 8722 OR Fname != "Lisa"


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 >= 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 <> 7 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 <> 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 <= 5 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 3


Question: SELECT Store_ID, District_ID FROM store_district WHERE "District_ID" <= 15 AND "Store_ID" > 2 INTERSECT SELECT Store_ID, District_ID FROM store_district WHERE "Store_ID" != 3 AND "District_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 <> 9


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 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 > 1


Question: SELECT AVG(eid), name, salary FROM employee WHERE name != "Lawrence Sperry" UNION SELECT AVG(eid), name, salary FROM employee WHERE name <> "Linda Davis" OR "salary" <= 205187


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 > 9


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 <> 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 <= 8 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT aid FROM certificate WHERE "aid" >= 12 UNION ALL SELECT aid FROM flight WHERE "aid" != 3 OR destination != "Washington D.C."


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 = 4 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 <> 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 >= 3 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 <> 3 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 <= 3 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 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 < 3


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 Year, Member_ID FROM purchase WHERE Branch_ID != "3" UNION ALL SELECT Year, Member_ID FROM purchase WHERE Branch_ID <> "1" AND "Total_pounds" <= 430.29 OR "Member_ID" <= 2


Question: SELECT name, u_id FROM useracct WHERE name <> "Roxi" AND "u_id" <> 2 UNION ALL SELECT name, u_id FROM useracct WHERE "u_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 = 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 < 7


Question: SELECT Model FROM car_names WHERE Model <> "volkswagen" OR "MakeId" <= 142 INTERSECT SELECT Model FROM model_list WHERE "ModelId" <> 4 OR "Maker" <> 4 AND Model <> "datsun"


Question: SELECT MAX(PetID), StuID FROM Has_Pet WHERE "PetID" < 2003 UNION SELECT MAX(PetID), StuID FROM Has_Pet WHERE "PetID" = 2002 OR "StuID" > 1001


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 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 copy_number, document_id, draft_number FROM Draft_Copies WHERE "copy_number" >= 5 AND "document_id" <> 4 AND "draft_number" < 20 UNION SELECT copy_number, document_id, draft_number FROM Draft_Copies WHERE "draft_number" < 1


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 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 < 7


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 > 1 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 <= 2 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 <> 5 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 4


Question: SELECT document_type_code FROM Documents WHERE shipping_agent_code != "UP" AND receipt_number = "117" UNION ALL SELECT document_type_code FROM Ref_Document_Types WHERE document_type_code <> "CD"


Question: SELECT MIN(Year_working), People_ID, SUM(Company_ID) FROM employment WHERE "Year_working" <= 3 OR "People_ID" = 2 OR "Company_ID" <= 13 UNION ALL SELECT MIN(Year_working), People_ID, SUM(Company_ID) FROM employment WHERE "People_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 <> 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 > 2


Question: SELECT AVG(T1.ClubID), T2.StuID FROM Club as T1 JOIN Member_of_club as T2 ON T1.ClubID = T2.ClubID WHERE ClubName = "Bootup Baltimore" GROUP BY ClubLocation HAVING ClubLocation = "AKW"


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 != 10 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 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 = 4


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 T1.area_code, T2.contestant_number FROM AREA_CODE_STATE as T1 JOIN VOTES as T2 ON T1.state == T2.state GROUP BY created HAVING vote_id <= 5 AND contestant_number >= 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 Player_ID FROM player WHERE Gender != "M" OR Occupation = "Retired" AND "Player_ID" > 6 OR "Votes" = 14097 OR Rank <> "2nd" OR Residence <> "Brandon" UNION ALL SELECT Player_ID FROM player_coach WHERE "Player_ID" != 14 AND "Coach_ID" <> 5


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 < 3


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 > 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 contestant_number, phone_number, created FROM VOTES WHERE "contestant_number" < 2 AND state != "CA" AND "phone_number" != 6209222712 OR "vote_id" != 5 UNION ALL SELECT contestant_number, phone_number, created FROM VOTES WHERE created = "2018-03-09 19:03:40" OR "contestant_number" <> 3


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 = 3 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 <= 7 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 > 3 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 5


Question: SELECT max_page_size, dpi, interface, pages_per_minute_color, dimensions, product_id, product FROM product WHERE interface <> "USB 2.0" AND "product_id" < 6 AND "dpi" > 600.0 AND product <> "ScanShell 3000DN" AND "pages_per_minute_color" <> 3.0 OR dimensions <> "298 x 209 x 99" UNION ALL SELECT max_page_size, dpi, interface, pages_per_minute_color, dimensions, product_id, product FROM product WHERE "pages_per_minute_color" < 3.0 OR interface = "USB 2.0" OR product <> "Canon imageFORMULA P-150" OR "dpi" != 600.0 OR dimensions != "280 x 95 x 40"


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 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 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 > 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 > 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT Enrollment, MAX(Location), AVG(School_name), SUM(County), IHSAA_Football_Class FROM School WHERE IHSAA_Football_Class != "A" OR School_id = "6" OR "Enrollment" < 379 OR IHSAA_Class = "AAA" OR School_name != "New Prairie 1" AND Mascot != "Redskins" AND Location = "Knox" UNION ALL SELECT Enrollment, MAX(Location), AVG(School_name), SUM(County), IHSAA_Football_Class FROM School WHERE Location = "Walkerton" AND IHSAA_Class <> "A" AND School_name != "Bremen" OR "Enrollment" <= 601


Question: SELECT mailed_to_address_id FROM Documents_Mailed WHERE "mailed_to_address_id" <= 0 AND mailing_date <> "1973-02-21 10:17:01" OR "document_id" > 12 INTERSECT SELECT mailed_to_address_id FROM Documents_Mailed WHERE mailing_date != "1992-11-07 15:03:41" OR "document_id" > 20 AND "mailed_to_address_id" > 3


Question: SELECT Gender, Rank FROM coach WHERE Gender <> "M" OR "Coach_ID" < 3 AND "Club_ID" <> 3 OR Coach_name <> "James Wong" UNION ALL SELECT Gender, Rank FROM player WHERE Rank <> "3rd"


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 >= 3


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 amount_outstanding, date_became_customer, customer_status_code, phone_number, email_address, customer_address_id, first_name, last_name, customer_id FROM Customers WHERE "customer_id" < 4 AND "customer_address_id" <> 1 OR date_became_customer != "2016-02-17 08:26:23" OR date_of_birth = "1996-05-23 01:21:54" AND last_name != "Koelpin" OR cell_mobile_phone_number <> "081-097-3684" INTERSECT SELECT amount_outstanding, date_became_customer, customer_status_code, phone_number, email_address, customer_address_id, first_name, last_name, customer_id FROM Customers WHERE cell_mobile_phone_number <> "+57(9)4602098297" AND "customer_address_id" != 9 OR phone_number <> "(662)490-3108" AND first_name = "Dameon" AND "customer_id" < 6 OR date_of_birth <> "1994-05-07 01:32:16" AND last_name <> "Terry"


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 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 <> 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5


Question: SELECT Driver_ID, Name, Home_city FROM driver WHERE Party != "Dem" UNION SELECT Driver_ID, Name, Home_city FROM driver WHERE "Age" = 36 AND Home_city = "Bethel" OR Party != "Dem" OR Name != "Timothy Ackert" AND "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 feature_type_code FROM Other_Available_Features WHERE feature_description <> "Swimming Pool." OR feature_name = "Pool" OR feature_type_code <> "Security" OR "feature_id" > 3 UNION SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_code <> "Security"


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 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 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 School_id FROM budget WHERE "Year" != 1999 OR "Budgeted" <= 6803 AND "School_id" >= 4 AND "total_budget_percent_invested" = 2.2 OR "Invested" >= 5840 UNION SELECT School_id FROM endowment WHERE donator_name <> "Com. Dom. En Estados Unidos" OR "amount" = 9.73 OR "endowment_id" != 3 AND "School_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 < 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 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 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 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 >= 1 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 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 >= 5 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 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 < 3


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 i_id FROM review WHERE "rank" != 6 OR "rating" <> 5 OR "i_id" <= 1 INTERSECT SELECT i_id FROM review WHERE "rating" = 5 AND "u_id" > 1


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 Name FROM company WHERE Headquarters = "USA" UNION SELECT Name FROM people WHERE Nationality != "United Kindom" AND "People_ID" != 5 AND "Age" > 27 AND Name <> "Darryl Kennedy" OR Graduation_College = "Virginia"


Question: SELECT aid FROM aircraft WHERE "aid" <= 16 INTERSECT SELECT aid FROM certificate WHERE "eid" > 567354612


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 Major, Sex, LName, Advisor, StuID FROM Student WHERE "Major" > 600 OR Sex = "M" OR "StuID" <= 1004 OR Fname <> "Lisa" AND LName = "Kumar" AND "Advisor" >= 1121 AND "Age" > 27 OR city_code = "HOU" UNION SELECT Major, Sex, LName, Advisor, StuID FROM Student WHERE Fname <> "Ian" AND "StuID" < 1035 AND "Advisor" < 1121 AND Sex != "M" OR city_code != "PIT" OR "Age" = 19


Question: SELECT Coach_ID, Starting_year FROM player_coach WHERE "Coach_ID" = 1 OR "Player_ID" >= 4 UNION SELECT Coach_ID, Starting_year FROM player_coach WHERE "Starting_year" <> 2011 AND "Coach_ID" <> 5


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 <> 3 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 9


Question: SELECT AVG(Altitude), MIN(Pilot), airport_id, SUM(Date), Velocity FROM flight WHERE "airport_id" < 6 AND "id" <> 13 OR Vehicle_Flight_number <> "M2-F1 #73" AND "Altitude" <> 3650.0 OR "Velocity" > 240.0 EXCEPT SELECT AVG(Altitude), MIN(Pilot), airport_id, SUM(Date), Velocity FROM flight WHERE "Velocity" < 240.0 OR Date = "October 25, 1963" AND "Altitude" < 3650.0 OR "id" <> 3 AND "airport_id" <= 1 AND Pilot = "Thompson" OR "company_id" <> 5

AVG(Altitude) MIN(Pilot) airport_id SUM(Date) Velocity


Question: SELECT staff_id, lesson_id, vehicle_id, lesson_time, lesson_date, lesson_status_code FROM Lessons WHERE lesson_date <> "2018-03-07 16:12:36" UNION ALL SELECT staff_id, lesson_id, vehicle_id, lesson_time, lesson_date, lesson_status_code FROM Lessons WHERE "lesson_id" > 8 AND "customer_id" <= 9 OR "price" != 495.0 AND lesson_status_code = "Cancelled" AND "staff_id" < 15 OR "vehicle_id" <= 2


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 <= 3 EXCEPT 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 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 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 <> 7 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 7


Question: SELECT Publication_ID FROM publication WHERE Publisher <> "Pearson" OR "Publication_ID" < 4 AND Publication_Date = "October 2005" AND "Price" > 6000000.0 OR "Book_ID" <> 4 EXCEPT SELECT Publication_ID FROM publication WHERE "Publication_ID" <> 6 AND "Price" >= 2000000.0 AND Publication_Date = "June 2006"


Question: SELECT Type, MAX(Group_Equity_Shareholding), id, AVG(name), SUM(Principal_activities), Incorporated_in FROM operate_company WHERE name = "Air China Cargo" AND Incorporated_in != "China" UNION ALL SELECT Type, MAX(Group_Equity_Shareholding), id, AVG(name), SUM(Principal_activities), Incorporated_in FROM operate_company WHERE name != "Cathay Pacific Services Limited" OR "id" != 11 AND Type = "Subsidiary" AND Incorporated_in <> "Taiwan"


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 > 10


Question: SELECT COUNT(role_code), MAX(role_description) FROM Roles WHERE role_description != "Proof Manager" UNION SELECT COUNT(role_code), MAX(role_description) FROM Roles WHERE role_description <> "Photo" AND role_code = "PT"


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 < 5


Question: SELECT name, u_id FROM useracct WHERE name = "Rosie" OR "u_id" >= 1 UNION ALL SELECT name, u_id FROM useracct WHERE name <> "Helen"


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 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 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 <> 7


Question: SELECT i_id FROM item WHERE title != "orange" AND "i_id" = 3 UNION ALL SELECT i_id FROM review WHERE "a_id" = 3 OR "i_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 <> 9


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 SUM(document_type_description) FROM Ref_Document_Types WHERE document_type_description != "b" AND document_type_code = "Hard Drive" UNION ALL SELECT SUM(document_type_description) FROM Ref_Document_Types WHERE document_type_description = "u" AND document_type_code != "Paper"


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 Store_ID, AVG(District_ID) FROM store_district WHERE "Store_ID" >= 1 OR "District_ID" = 3 UNION SELECT Store_ID, AVG(District_ID) FROM store_district WHERE "District_ID" != 15


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 <> 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 != 1


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 != 4 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


Question: SELECT shipping_agent_code FROM Documents WHERE other_details != "p" OR document_status_code <> "done" AND receipt_date != "1996-07-27 03:30:40" AND "document_id" = 17 AND document_type_code != "Paper" AND shipping_agent_code = "FE" EXCEPT SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name <> "UPS"


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 Name FROM branch WHERE membership_amount != "91" EXCEPT SELECT Name FROM member WHERE "Level" > 6 OR Name != "Corey Peters" OR Hometown != "Fort Campbell, Kentucky" OR "Member_ID" < 10 OR Card_Number <> "SLB51"


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 <= 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 < 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 <> 4 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 <= 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 > 5 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 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 T1.Freight_Metric_Tonnes, MAX(T2.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 < 12 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 != 3 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 3


Question: SELECT StuID, Sex, AVG(Major), city_code FROM Student WHERE LName != "Gompers" UNION SELECT StuID, Sex, AVG(Major), city_code FROM Student WHERE "Major" <= 550 OR "Age" > 19 OR Sex != "F" OR city_code = "BAL" OR "StuID" >= 1030 OR Fname <> "Jandy" AND LName <> "Han"


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 COUNT(T1.distance), T2.eid FROM aircraft as T1 JOIN certificate as T2 ON T1.aid = T2.aid WHERE "distance" < 2128 OR name = "Airbus A319"


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 ClubID FROM Club WHERE "ClubID" != 2 UNION ALL SELECT ClubID FROM Member_of_club WHERE "ClubID" >= 4 AND Position <> "CTO"


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 id FROM albums WHERE "id" < 224 OR title != "Live [Disc 2]" UNION SELECT id FROM genres WHERE name <> "Latin" OR "id" != 3


Question: SELECT SUM(aid) FROM certificate WHERE "eid" = 269734834 OR "aid" <= 3 EXCEPT SELECT SUM(aid) FROM flight WHERE "aid" < 9 AND "price" != 425.98 AND destination = "Los Angeles" AND departure_date = "04/12/2005 09:30" AND "flno" < 99