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 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 Maker FROM car_makers WHERE Country != "3" AND Maker = "ford" AND "Id" = 12 OR FullName = "Toyota" UNION SELECT Maker FROM model_list WHERE Model != "renault" AND "Maker" <= 17 OR "ModelId" >= 23


Question: SELECT ContId, MIN(Continent) FROM continents WHERE Continent <> "australia" EXCEPT SELECT ContId, MIN(Continent) FROM continents WHERE "ContId" != 4


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


Question: SELECT Fname FROM Student WHERE "Advisor" <> 1121 OR "StuID" <> 1028 OR Sex != "F" OR "Major" < 600 EXCEPT SELECT Fname FROM Student WHERE "Advisor" <= 2311 AND Sex <> "M" OR "Age" != 27 OR "StuID" >= 1010 AND Fname = "Dinesh"


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 Name FROM employee WHERE "Age" != 30 AND "Employee_ID" < 5 UNION SELECT Name FROM shop WHERE District <> "Arto Tolsa Areena" OR Name != "HJK" OR Location <> "Kuopio" OR "Number_products" >= 3516 OR "Shop_ID" < 7 AND Manager_name = "Pekka Lyyski"


Question: SELECT Member_ID FROM membership_register_branch WHERE "Member_ID" <> 3 INTERSECT SELECT Member_ID FROM purchase WHERE "Total_pounds" <= 232.09 AND "Member_ID" <= 6 OR Year != "2018"


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


Question: SELECT School_id, AVG(total_budget_percent_budgeted), Budgeted, MAX(Budget_invested_percent), Invested FROM budget WHERE "total_budget_percent_invested" > 2.2 OR "Budgeted" <> 6803 AND "School_id" >= 1 OR "total_budget_percent_budgeted" >= 2.4 AND Budget_invested_percent <> "146.9" EXCEPT SELECT School_id, AVG(total_budget_percent_budgeted), Budgeted, MAX(Budget_invested_percent), Invested FROM budget WHERE "Year" = 2006 OR "Invested" > 85249 AND "total_budget_percent_budgeted" > 2.0 AND "total_budget_percent_invested" > 2.0


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


Question: SELECT shipping_agent_name, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_description <> "k" UNION SELECT shipping_agent_name, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name != "Fedex"


Question: SELECT Maker, FullName, Country, Id FROM car_makers WHERE "Id" >= 7 OR FullName != "Ford Motor Company" AND Maker <> "hyundai" OR Country = "4" UNION SELECT Maker, FullName, Country, Id FROM car_makers WHERE FullName = "American Motor Company" OR "Id" < 12


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


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


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 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 < 5 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT customer_id FROM Customer_Payments WHERE payment_method_code != "Direct Debit" UNION SELECT customer_id FROM Lessons WHERE "staff_id" < 8 AND "lesson_id" = 6 AND "price" != 199.0


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


Question: SELECT MAX(property_id) FROM Other_Property_Features WHERE property_feature_description <> "hic" AND "property_id" = 14 UNION ALL SELECT MAX(property_id) FROM Properties WHERE apt_feature_1 <> "aut" AND date_on_market = "1993-08-04 10:49:04" OR hse_feature_2 = "None" OR shp_feature_1 != "None" AND fld_feature_3 = "None"


Question: SELECT feature_type_name, feature_type_code FROM Ref_Feature_Types WHERE feature_type_name != "Amenity, eg Pool." AND feature_type_code <> "Amenity" UNION ALL SELECT feature_type_name, feature_type_code FROM Ref_Feature_Types WHERE feature_type_code != "Amenity" AND feature_type_name <> "Securiyt, eg Burglar Alarm."


Question: SELECT AVG(role_code), role_description FROM Roles WHERE role_code != "PT" AND role_description = "Proof Manager" UNION SELECT AVG(role_code), role_description FROM Roles WHERE role_description != "Proof Manager"


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


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 3 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 <> 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 <= 9 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 4


Question: SELECT AVG(RoomId), SUM(bedType), maxOccupancy, COUNT(basePrice), beds FROM Rooms WHERE bedType <> "Queen" OR roomName = "Mendicant with cryptic" AND "basePrice" <> 100 OR RoomId <> "HBB" OR "beds" = 2 INTERSECT SELECT AVG(RoomId), SUM(bedType), maxOccupancy, COUNT(basePrice), beds FROM Rooms WHERE RoomId <> "CAS"

AVG(RoomId) SUM(bedType) maxOccupancy COUNT(basePrice) beds


Question: SELECT ClubID FROM Club WHERE ClubName != "Bootup Baltimore" AND "ClubID" != 3 OR ClubDesc != "Venture capital fund for student business." UNION ALL SELECT ClubID FROM Member_of_club WHERE "StuID" < 1001


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 SUM(document_id) FROM Documents_Mailed WHERE "mailed_to_address_id" > 5 UNION SELECT SUM(document_id) FROM Draft_Copies WHERE "document_id" > 20 AND "copy_number" > 15


Question: SELECT Branch_ID FROM branch WHERE Address_road = "Valleys Place" OR Name <> "Saint Amant" UNION ALL SELECT Branch_ID FROM membership_register_branch WHERE Branch_ID != "4" AND Register_Year <> "2016"


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


Question: SELECT Continent FROM continents WHERE Continent != "asia" AND "ContId" >= 1 EXCEPT SELECT Continent FROM continents WHERE Continent = "america"


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 Name FROM company WHERE Name = "PetroChina" UNION ALL SELECT Name FROM people WHERE "People_ID" != 2 OR Nationality <> "United States"


Question: SELECT StuID FROM Has_Allergy WHERE Allergy = "Ragweed" AND "StuID" <> 1007 UNION ALL SELECT StuID FROM Student WHERE "Major" <> 600


Question: SELECT MAX(i_id) FROM item WHERE "i_id" != 3 AND title = "blue hoodie" UNION SELECT MAX(i_id) FROM item WHERE "i_id" <> 5 AND title <> "cup"


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 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 Name, Birth_Date, Height FROM people WHERE "People_ID" != 2 OR Name != "Semen Poltavskiy" AND Nationality != "Russia" OR "Height" > 207.0 UNION SELECT Name, Birth_Date, Height FROM people WHERE "Height" <= 207.0


Question: SELECT Aircraft_ID, MIN(Max_disk_Loading), Max_Gross_Weight, Total_disk_area, Description, AVG(Aircraft) FROM aircraft WHERE Max_Gross_Weight != "73,500 lb (33,300 kg)" AND "Aircraft_ID" = 1 OR Max_disk_Loading != "2.6 lb/ft² (14 kg/m²)" OR Description = "Tandem rotor helicopter" OR Total_disk_area = "5,655 ft² (526 m²)" OR Aircraft != "Robinson R-22" UNION SELECT Aircraft_ID, MIN(Max_disk_Loading), Max_Gross_Weight, Total_disk_area, Description, AVG(Aircraft) FROM aircraft WHERE Total_disk_area != "4,900 ft² (460 m²)" AND Description <> "Heavy-lift helicopter"

1
2.6 lb/ft² (14 kg/m²)
1,370 lb (635 kg)
497 ft² (46.2 m²)
Light utility helicopter
0


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


Question: SELECT 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 MIN(School_id) FROM budget WHERE "School_id" = 3 OR "Year" = 2004 OR "Invested" <= 95542 UNION SELECT MIN(School_id) FROM endowment WHERE "endowment_id" = 2 AND "amount" > 9.83 OR donator_name <> "Valverde" OR "School_id" <= 2


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


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


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


Question: SELECT mailed_to_address_id, document_id FROM Documents_Mailed WHERE "document_id" >= 24 AND mailing_date = "2007-03-20 05:22:01" AND "mailed_to_address_id" < 8 UNION ALL SELECT mailed_to_address_id, document_id FROM Documents_Mailed WHERE mailing_date != "1986-05-16 06:25:33" AND "document_id" != 10 AND "mailed_to_address_id" = 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 > 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 Store_ID FROM store WHERE Type <> "City Mall" OR Store_Name <> "Blackville" OR "Store_ID" = 4 UNION ALL SELECT Store_ID FROM store_district WHERE "Store_ID" <> 4


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


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


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


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


Question: SELECT date_left_staff, MAX(first_name), nickname, date_of_birth FROM Staff WHERE middle_name = "Duane" OR date_joined_staff <> "2017-08-30 15:08:37" OR "staff_address_id" <= 1 AND "staff_id" > 15 AND first_name = "Queenie" INTERSECT SELECT date_left_staff, MAX(first_name), nickname, date_of_birth FROM Staff WHERE "staff_address_id" = 2 OR date_joined_staff = "2017-08-27 19:19:44" OR date_of_birth = "2004-05-19 14:11:13" OR middle_name <> "Mayra"


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


Question: SELECT SUM(city_code) FROM Student WHERE city_code = "ROC" OR Sex <> "M" AND "Advisor" != 8721 AND Fname != "Tracy" AND "Major" >= 50 AND LName <> "Woods" OR "Age" <= 20 UNION ALL SELECT SUM(city_code) FROM Student WHERE "StuID" != 1034 AND Fname <> "Michael" AND "Age" = 19


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


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


Question: SELECT Store_ID FROM store_district WHERE "District_ID" <> 15 UNION ALL SELECT Store_ID FROM store_product WHERE "Product_ID" >= 6


Question: SELECT Club_ID FROM club WHERE "Start_year" != 2001 AND "Club_ID" != 1 OR Region = "USA" AND Club_name != "Helsingborgs IF" INTERSECT SELECT Club_ID FROM match_result WHERE "Points" >= 139


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


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


Question: SELECT COUNT(Coach_ID), AVG(Coach_name) FROM coach WHERE "Rank" <= 3 AND Coach_name <> "Jameson Tomas" EXCEPT SELECT COUNT(Coach_ID), AVG(Coach_name) FROM coach WHERE Coach_name != "James Wong" OR "Club_ID" = 1


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 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 = 4


Question: SELECT age, MIN(head_ID), name, MIN(born_state) FROM head WHERE name != "Sergio García" AND "head_ID" > 1 AND born_state = "Connecticut" EXCEPT SELECT age, MIN(head_ID), name, MIN(born_state) FROM head WHERE name != "Franklin Langham" OR "head_ID" > 4 AND born_state != "California"


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 >= 6 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 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 <> 1 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 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 StuID FROM Member_of_club WHERE "ClubID" != 4 AND "StuID" != 1001 OR Position != "President" INTERSECT SELECT StuID FROM Student WHERE "Major" <= 600 AND "StuID" = 1029 OR "Advisor" > 8722 AND city_code = "YYZ" OR Sex = "M" OR "Age" > 18 AND LName != "Goldman" AND Fname = "David"


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


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID != 5 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 <= 10 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID = 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 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 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 i_id FROM item WHERE title != "comb" AND "i_id" <= 3 UNION ALL SELECT i_id FROM item WHERE "i_id" >= 5 OR title <> "avocado"


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


Question: SELECT MIN(T1.id), T2.company_id FROM airport as T1 JOIN flight as T2 ON T1.id = T2.id WHERE IATA <> "BLL" OR Date = "January 29, 1964" OR "Altitude" <= 3650.0 AND ICAO <> "EBBR" AND "airport_id" > 2 AND name = "Billund Airport"


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


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


Question: SELECT COUNT(T1.Book_ID), T2.Price FROM book as T1 JOIN publication as T2 ON T1.Book_ID = T2.Book_ID WHERE Title = "The Dome: Ground Zero" AND Publication_Date <> "August 2008" OR Price <> 2000000.0 AND Writer <> "Garth Ennis" AND AVG(Publication_ID) > 5


Question: SELECT Name FROM employee WHERE "Employee_ID" != 8 OR "Age" != 30 AND Name <> "Phil Vickery" EXCEPT SELECT Name FROM shop WHERE "Shop_ID" > 4 OR "Number_products" <> 4780 OR Location != "Turku" AND Manager_name <> "Job Dragtsma"


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 9 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 > 4


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 3 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 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 COUNT(Number_products), Manager_name FROM shop WHERE "Number_products" >= 4780 OR Manager_name != "Mika Lehkosuo" OR "Shop_ID" != 1 OR District <> "Veritas Stadion" EXCEPT SELECT COUNT(Number_products), Manager_name FROM shop WHERE Location = "Jakobstad" AND Name = "FF Jaro" AND "Number_products" > 10000


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


Question: SELECT MIN(Market_Value_in_Billion), MIN(Company_ID), Profits_in_Billion, COUNT(Industry) FROM company WHERE Name <> "Industrial and Commercial Bank of China" AND "Company_ID" > 9.0 OR "Assets_in_Billion" >= 302.6 OR Industry = "Banking" GROUP BY Profits_in_Billion HAVING COUNT(Industry) >= 1 OR MIN(Market_Value_in_Billion) >= 170.1 AND MIN(Company_ID) < 15.0 EXCEPT SELECT MIN(Market_Value_in_Billion), MIN(Company_ID), Profits_in_Billion, COUNT(Industry) FROM company WHERE "Market_Value_in_Billion" <= 180.0 OR Name <> "General Electric" OR Industry = "Retailing" AND "Company_ID" > 17.0 OR "Profits_in_Billion" = 20.1 AND "Sales_in_Billion" > 447.0 OR "Assets_in_Billion" >= 319.4 GROUP BY Profits_in_Billion HAVING MIN(Market_Value_in_Billion) <> 154.8


Question: SELECT Employee_ID FROM employee WHERE City = "Bristol" AND "Age" <> 36 AND "Employee_ID" < 4 OR Name <> "Matt Stevens" UNION SELECT Employee_ID FROM hiring WHERE "Employee_ID" <= 5 AND Start_from = "2003" AND Is_full_time = "T"


Question: SELECT name FROM aircraft WHERE "aid" < 2 UNION ALL SELECT name FROM employee WHERE name <> "Robert Brown" AND "salary" > 212156


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


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


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


Question: SELECT AVG(id) FROM albums WHERE "id" = 74 AND title != "Mozart Gala: Famous Arias" OR "artist_id" >= 22 UNION SELECT AVG(id) FROM employees WHERE fax != "+1 (403) 262-3322" AND "id" > 5 OR city != "Edmonton" OR country != "Canada" OR "reports_to" > 1.0


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


Question: SELECT property_type_code FROM Properties WHERE shp_feature_3 != "None" AND apt_feature_3 <> "None" OR "property_id" != 10 OR property_type_code <> "Apartment" OR fld_feature_1 = "None" AND date_on_market != "1981-08-23 05:40:38" AND hse_feature_1 <> "None" OR oth_feature_3 <> "None" AND apt_feature_1 <> "qui" AND shp_feature_1 = "None" OR fld_feature_2 <> "None" OR property_address != "1474 Dibbert Fields Suite 055 South Renee, IN 58286-3097" OR hse_feature_2 != "None" OR other_property_details <> "None" AND apt_feature_2 <> "est" OR date_sold = "1979-05-13 16:58:06" OR shp_feature_2 <> "None" AND hse_feature_3 = "None" AND fld_feature_3 != "None" UNION SELECT property_type_code FROM Ref_Property_Types WHERE property_type_code = "Shop"


Question: SELECT T1.Total_Passengers, 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 > 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 != 4 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 7


Question: SELECT staff_id FROM Lessons WHERE "lesson_id" > 2 OR "vehicle_id" >= 2 OR lesson_status_code != "Cancelled" UNION ALL SELECT staff_id FROM Staff WHERE date_left_staff != "2018-03-08 04:23:14" OR "staff_address_id" = 2 AND last_name <> "Jast" AND date_of_birth <> "2015-08-01 13:22:43" AND "staff_id" <> 10 AND date_joined_staff = "2016-05-16 20:56:53" OR nickname != "santos45" OR middle_name = "Maiya" OR first_name != "Ernestina"


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


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 3 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 <> 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 = 1 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 10


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


Question: SELECT source_u_id FROM trust WHERE "trust" >= 4 AND "target_u_id" >= 2 UNION ALL SELECT source_u_id FROM trust WHERE "source_u_id" >= 1


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


Question: SELECT feature_id, feature_description, feature_type_code FROM Other_Available_Features WHERE feature_type_code = "Amenity" UNION SELECT feature_id, feature_description, feature_type_code FROM Other_Available_Features WHERE "feature_id" < 3 OR feature_type_code = "Amenity" OR feature_description = "Burglar Alarm" AND feature_name != "AirCon"


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 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 Creation, Budget_in_Billions, Num_Employees, Name FROM department WHERE "Ranking" = 5 OR "Department_ID" < 9 OR "Num_Employees" != 67000.0 OR Creation = "1789" INTERSECT SELECT Creation, Budget_in_Billions, Num_Employees, Name FROM department WHERE "Department_ID" >= 10


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


Question: SELECT 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 Branch_ID FROM branch WHERE City <> "London" AND Address_road <> "Abbey Rise" AND Name = "Popert" OR "Branch_ID" >= 8 UNION SELECT Branch_ID FROM membership_register_branch WHERE Branch_ID = "6"


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 MIN(T1.Aircraft_ID), T2.Airport_ID FROM aircraft as T1 JOIN airport_aircraft as T2 ON T1.Aircraft_ID = T2.Aircraft_ID WHERE Airport_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 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 = 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 = 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 <= 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 != 10 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <= 9


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


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


Question: SELECT MAX(Template_ID) FROM Documents WHERE Document_Name <> "Customer reviews" INTERSECT SELECT MAX(Template_ID) FROM Templates WHERE Date_Effective_To <> "1998-05-12 12:51:29" OR Template_Type_Code = "BK" OR Template_Details = "" OR "Version_Number" > 5 OR Date_Effective_From = "2005-02-20 00:31:34" OR "Template_ID" = 19


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 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 Store_Name, Type, Number_of_product_category, Area_size, Store_ID FROM store WHERE Type != "Village Store" AND "Store_ID" <= 1 AND Store_Name <> "Miramichi" OR "Number_of_product_category" >= 990.0 AND "Ranking" != 10 INTERSECT SELECT Store_Name, Type, Number_of_product_category, Area_size, Store_ID FROM store WHERE "Store_ID" >= 2 OR "Area_size" = 179.84 OR Type != "Village Store" AND "Ranking" > 1 AND Store_Name != "Blackville" OR "Number_of_product_category" < 990.0


Question: SELECT Zip_code FROM county WHERE "County_Id" <= 5 OR Zip_code != "D21" AND "Population" <= 13300.0 OR County_name <> "Mansfield" IN (SELECT Zip_code FROM county WHERE Zip_code != "D09")


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


Question: SELECT Store_ID, Product_ID FROM store_product WHERE "Store_ID" = 1 OR "Product_ID" != 2 INTERSECT SELECT Store_ID, Product_ID FROM store_product WHERE "Product_ID" >= 6


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


Question: SELECT Coach_name, Coach_ID, Gender, Rank, Club_ID FROM coach WHERE "Coach_ID" <= 2 UNION SELECT Coach_name, Coach_ID, Gender, Rank, Club_ID FROM coach WHERE "Club_ID" <= 1 AND Gender = "M" OR "Rank" >= 5 AND Coach_name <> "Jameson Tomas"


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 document_type_code, shipping_agent_code, document_status_code, receipt_date FROM Documents WHERE "document_id" = 10 AND document_type_code != "Hard Drive" AND receipt_date <> "1986-12-14 14:18:59" AND other_details = "u" AND document_status_code = "done" OR shipping_agent_code != "FE" OR receipt_number = "79" UNION SELECT document_type_code, shipping_agent_code, document_status_code, receipt_date FROM Documents WHERE other_details != "h" OR document_type_code = "Paper"

Hard Drive
AL
overdue
1985-11-05 17:59:34

Hard Drive
FE
working
1999-04-17 14:19:32

Hard Drive
FE
working
2005-09-30 00:10:02

Hard Drive
US
overdue
1996-05-31 06:51:58


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


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


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


Question: SELECT Template_Type_Code, Template_Type_Description FROM Ref_Template_Types WHERE Template_Type_Description != "CV" OR Template_Type_Code = "BK" INTERSECT SELECT Template_Type_Code, Template_Type_Description FROM Ref_Template_Types WHERE Template_Type_Code = "CV" OR Template_Type_Description != "Advertisement"


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


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


Question: SELECT id FROM albums WHERE "artist_id" >= 245 UNION ALL SELECT id FROM playlists WHERE name <> "90’s Music"


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 customer_id FROM Customer_Payments WHERE "customer_id" != 12 UNION ALL SELECT customer_id FROM Lessons WHERE "staff_id" <> 4 AND "price" <= 295.0 OR lesson_time = "6" AND lesson_date != "2018-03-07 16:12:36" OR "lesson_id" != 14


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


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


Question: SELECT u_id FROM useracct WHERE name = "Nancy" OR "u_id" > 4 UNION ALL SELECT u_id FROM useracct WHERE "u_id" >= 6 OR name = "Rosie"


Question: SELECT date_of_birth FROM Customers WHERE cell_mobile_phone_number <> "(630)964-2426" AND "customer_address_id" < 13 OR email_address <> "karina.carroll@example.net" OR phone_number <> "206-054-0689x05861" AND first_name <> "Omer" AND "amount_outstanding" >= 3751.0 OR customer_status_code <> "Bad Customer" OR "customer_id" <= 5 AND last_name = "Ortiz" OR date_of_birth != "1991-02-10 00:42:17" UNION ALL SELECT date_of_birth FROM Staff WHERE date_of_birth <> "2003-01-16 06:29:11" AND last_name <> "Turner" AND nickname != "ymiller" OR date_joined_staff = "2016-05-16 20:56:53" AND middle_name <> "Tre" AND "staff_address_id" > 2 AND "staff_id" <= 4 OR date_left_staff = "2018-03-14 07:14:37"


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 feature_type_code FROM Other_Available_Features WHERE feature_name = "AirCon" AND feature_type_code <> "Security" OR "feature_id" > 3 INTERSECT SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_name <> "Amenity, eg Pool." OR feature_type_code = "Security"


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 5 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 < 4


Question: SELECT School_name, AVG(Mascot), Location, COUNT(Enrollment), County FROM School WHERE County != "50 Marshall" OR Mascot = "Trojans" OR School_id <> "6" OR IHSAA_Football_Class != "AAA" EXCEPT SELECT School_name, AVG(Mascot), Location, COUNT(Enrollment), County FROM School WHERE IHSAA_Class != "AAA" AND "Enrollment" <> 379 AND IHSAA_Football_Class != "AAA" AND Location = "Lakeville" AND School_name != "LaVille" OR Mascot = "Falcons"

School_name AVG(Mascot) Location COUNT(Enrollment) County


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 date_left_staff FROM Staff WHERE "staff_address_id" <= 7 OR nickname != "norma73" OR last_name <> "Rogahn" OR first_name <> "Ernestina" AND date_left_staff = "2018-03-04 17:13:53" AND "staff_id" = 12 OR date_joined_staff = "2017-10-21 17:20:57" AND date_of_birth = "2010-12-08 16:55:14" AND middle_name = "Ulices" UNION SELECT date_left_staff FROM Staff WHERE first_name <> "Winnifred" AND date_left_staff = "2018-03-01 17:10:03" OR "staff_id" <= 15 OR middle_name <> "Mayra" OR date_of_birth != "2000-06-13 18:09:11" AND last_name != "Turner" OR "staff_address_id" != 3 OR nickname <> "bkunze" OR date_joined_staff != "2017-04-27 03:21:26"


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


Question: SELECT 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 SUM(customer_id) FROM Customer_Payments WHERE "amount_payment" = 5475.26 UNION SELECT SUM(customer_id) FROM Lessons WHERE "customer_id" >= 3 AND lesson_date != "2018-03-16 07:08:52" AND "vehicle_id" >= 1 AND lesson_status_code != "Cancelled" OR "lesson_id" < 7 AND "staff_id" < 1


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 Rank, Club_ID, Bronze, Big_Silver, Gold, Points, Small_Silver FROM match_result WHERE "Gold" >= 13 AND "Small_Silver" > 4 AND "Big_Silver" < 12 AND "Bronze" >= 9 AND "Club_ID" <> 6 OR "Points" = 102 UNION ALL SELECT Rank, Club_ID, Bronze, Big_Silver, Gold, Points, Small_Silver FROM match_result WHERE "Bronze" != 6 AND "Club_ID" != 2 OR "Small_Silver" <= 4 OR "Gold" <= 12 AND "Rank" < 1 AND "Big_Silver" > 14 OR "Points" >= 84


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


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


Question: SELECT AVG(Group_Equity_Shareholding), Type, Principal_activities, name, AVG(id), Incorporated_in FROM operate_company WHERE Incorporated_in != "China" OR Principal_activities = "Cargo airline" OR Type <> "Joint Venture" OR name != "CLS Catering Services Limited" OR "id" >= 1 AND "Group_Equity_Shareholding" < 18.77 UNION ALL SELECT AVG(Group_Equity_Shareholding), Type, Principal_activities, name, AVG(id), Incorporated_in FROM operate_company WHERE Type = "Joint Venture" AND "Group_Equity_Shareholding" != 100.0 AND Incorporated_in <> "Hong Kong" OR name = "Vogue Laundry Service Limited"

74.4835714286
Corporate
Airline
Air China
7.5
China

52.8
Joint Venture
Cargo airline
Air China Cargo
10.4
China


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 SUM(copy_number), document_id FROM Circulation_History WHERE "employee_id" > 2 UNION SELECT SUM(copy_number), document_id FROM Draft_Copies WHERE "document_id" <> 23 OR "draft_number" < 9 OR "copy_number" < 10


Question: SELECT Continent FROM continents WHERE Continent <> "asia" OR "ContId" >= 5 UNION ALL SELECT Continent FROM countries WHERE CountryName != "germany" AND "CountryId" > 6


Question: SELECT aid, distance FROM aircraft WHERE "aid" <> 10 UNION SELECT aid, distance FROM flight WHERE "flno" != 33 AND arrival_date != "04/12/2005 12:02" OR "distance" <> 2551


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 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 <= 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID > 4


Question: SELECT Election_ID, Counties_Represented, First_Elected, Delegate, Party, District FROM election WHERE "First_Elected" = 2006.0 OR Committee <> "Health and Government Operations" AND Delegate != "Pendergrass, Shane E. Shane Pendergrass" OR "Party" <> 1 OR "District" >= 2 EXCEPT SELECT Election_ID, Counties_Represented, First_Elected, Delegate, Party, District FROM election WHERE Delegate = "Malone, James E. Jr. James E. Malone, Jr." AND "Party" <> 1 AND Committee != "Ways and Means" OR "District" <> 3 OR "Election_ID" <> 3 AND Counties_Represented <> "13"


Question: SELECT document_id FROM Document_Drafts WHERE draft_details <> "b" INTERSECT SELECT document_id FROM Documents WHERE document_type_code <> "Hard Drive" AND shipping_agent_code != "FE" AND document_status_code != "overdue" OR other_details = "z" AND receipt_date <> "2014-12-25 17:22:44"


Question: SELECT arrival_date, aid, flno, distance, origin, destination, price, departure_date FROM flight WHERE "distance" != 7487 UNION ALL SELECT arrival_date, aid, flno, distance, origin, destination, price, departure_date FROM flight WHERE "distance" >= 2308 AND arrival_date = "04/12/2005 12:02" AND "flno" <= 99 OR departure_date = "04/12/2005 09:30" OR destination = "Tokyo"

arrival_date aid flno distance origin destination price departure_date


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 Employee_ID FROM employee WHERE City <> "Bristol" AND "Age" = 29 UNION SELECT Employee_ID FROM hiring WHERE "Shop_ID" < 1 OR Is_full_time = "T" OR Start_from = "2010" OR "Employee_ID" = 7


Question: SELECT Store_ID FROM store_district WHERE "Store_ID" != 3 OR "District_ID" != 11 UNION SELECT Store_ID FROM store_product WHERE "Product_ID" > 4 OR "Store_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 Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 3 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 2


Question: SELECT SUM(People_ID) FROM people WHERE Name = "Sergey Grankin" OR "People_ID" <> 4 OR Nationality <> "Russia" OR "Height" <= 187.0 AND Birth_Date != "August 16, 1982" EXCEPT SELECT SUM(People_ID) FROM poker_player WHERE "Final_Table_Made" <= 42.0 OR "Best_Finish" < 2.0 AND "Poker_Player_ID" = 5 AND "People_ID" < 1 AND "Earnings" < 476090.0


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


Question: SELECT Party_ID, Year FROM party WHERE "Year" > 1998.0 OR Party != "Working Families" AND Governor != "Eliot Spitzer" AND US_Senate = "(no election)" AND Comptroller <> "Carl McCall" OR Lieutenant_Governor = "Dennis Mehiel" OR Attorney_General = "Eliot Spitzer" AND "Party_ID" <> 3 INTERSECT SELECT Party_ID, Year FROM party WHERE Attorney_General = "Andrew Cuomo" OR US_Senate != "(no election)" AND Party != "Working Families" AND Lieutenant_Governor <> "David Paterson" AND "Party_ID" > 7 OR "Year" > 2002.0 OR Comptroller <> "Carl McCall"


Question: SELECT document_id, document_status_code, receipt_date, document_type_code, other_details, shipping_agent_code FROM Documents WHERE document_type_code <> "Paper" AND "document_id" <= 1 OR other_details <> "x" AND document_status_code != "done" AND receipt_date != "2017-07-02 17:39:09" UNION SELECT document_id, document_status_code, receipt_date, document_type_code, other_details, shipping_agent_code FROM Documents WHERE document_status_code = "overdue" OR "document_id" >= 4 OR receipt_date != "1999-04-17 14:19:32"


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID < 11 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 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 2


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


Question: SELECT Driver_ID FROM driver WHERE "Age" = 37 AND Home_city = "East Hartford" OR "Driver_ID" = 8 AND Name != "Douglas McCrory" AND Party <> "Rep" INTERSECT SELECT Driver_ID FROM school_bus WHERE "School_ID" < 3 OR If_full_time <> "T" AND "Driver_ID" != 7 AND "Years_Working" = 6


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


Question: SELECT SUM(Counties_Represented) FROM election WHERE Committee = "Environmental Matters" AND "Election_ID" >= 7 AND "First_Elected" >= 1994.0 UNION ALL SELECT SUM(Counties_Represented) FROM election WHERE "District" <> 3 AND Delegate <> "Guzzone, Guy Guy Guzzone" OR "Election_ID" <= 3 OR "Party" != 1 OR Committee != "Economic Matters" OR Counties_Represented <> "12.2 12B" OR "First_Elected" > 1994.0


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


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


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


Question: SELECT COUNT(name) FROM aircraft WHERE "aid" >= 7 AND name != "Boeing 727" UNION ALL SELECT COUNT(name) FROM employee WHERE "eid" > 486512566 AND name <> "Milo Brooks"


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


Question: SELECT property_feature_description FROM Other_Property_Features WHERE "feature_id" != 3 AND "property_id" >= 6 OR property_feature_description = "cumque" UNION ALL SELECT property_feature_description FROM Other_Property_Features WHERE property_feature_description = "doloribus" OR "feature_id" <> 2


Question: SELECT id FROM albums WHERE title = "Strauss: Waltzes" OR "id" > 30 UNION ALL SELECT id FROM genres WHERE name <> "Easy Listening"


Question: SELECT id, name, Type, Principal_activities, Group_Equity_Shareholding FROM operate_company WHERE "id" = 2 OR Principal_activities != "Airline" OR name = "Cathay Pacific Catering Services (HK) Limited" AND Incorporated_in <> "Canada" OR "Group_Equity_Shareholding" < 100.0 OR Type != "Subsidiary" EXCEPT SELECT id, name, Type, Principal_activities, Group_Equity_Shareholding FROM operate_company WHERE Principal_activities = "Airline" OR "id" >= 14 OR Type = "Subsidiary"


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


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


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


Question: SELECT School_id FROM School WHERE School_id = "7" AND Location != "New Carlisle" AND County != "20 Elkhart" UNION ALL SELECT School_id FROM endowment WHERE donator_name = "Com. Dom. En Estados Unidos" OR "School_id" > 7 OR "endowment_id" <= 3 AND "amount" > 9.05


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


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 3 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 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 <= 10


Question: SELECT School_id, total_budget_percent_invested, Budget_invested_percent, total_budget_percent_budgeted, Invested, Budgeted FROM budget WHERE "total_budget_percent_budgeted" >= 2.0 OR "Invested" != 146102 AND "School_id" = 1 OR "Budgeted" <= 4979 AND "Year" = 2006 AND Budget_invested_percent != "228.8" UNION ALL SELECT School_id, total_budget_percent_invested, Budget_invested_percent, total_budget_percent_budgeted, Invested, Budgeted FROM budget WHERE "Budgeted" >= 3666 OR "School_id" <= 3 OR "total_budget_percent_budgeted" != 1.3 AND "total_budget_percent_invested" >= 2.7 AND "Invested" <= 2134


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


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


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


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


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


Question: SELECT 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 SUM(eid) FROM certificate WHERE "aid" < 12 AND "eid" < 142519864 UNION ALL SELECT SUM(eid) FROM employee WHERE "eid" <= 489456522 AND "salary" < 212156 OR name != "Haywood Kelly"


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 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 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 = 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 9


Question: SELECT SUM(Grade), School, MIN(Type), Location FROM school WHERE Location <> "New York City" UNION SELECT SUM(Grade), School, MIN(Type), Location FROM school WHERE Location = "Honolulu, Hawaii" AND Grade != "College" OR "School_ID" <> 3

6
Punahou School
Private
Honolulu, Hawaii

10
Punahou School
Private
Honolulu, Hawaii


Question: SELECT StuID FROM Has_Pet WHERE "StuID" < 1002 OR "PetID" <= 2001 INTERSECT SELECT StuID FROM Student WHERE LName = "Smith" OR city_code != "PHL" OR "Major" <= 520 OR "Age" > 18 AND "Advisor" = 1148


Question: SELECT staff_id FROM Lessons WHERE "staff_id" != 12 AND "vehicle_id" > 1 OR lesson_date != "2018-03-16 07:08:52" AND "customer_id" >= 6 UNION ALL SELECT staff_id FROM Staff WHERE "staff_address_id" < 5 AND "staff_id" > 9 AND date_of_birth = "2015-08-01 13:22:43" OR nickname <> "santos45" OR last_name != "Maggio" AND first_name != "Simeon" OR date_left_staff <> "2018-03-08 05:16:29" OR middle_name != "Stephania"


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


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


Question: SELECT Coach_ID FROM coach WHERE "Rank" <= 3 AND Gender = "M" UNION SELECT Coach_ID FROM player_coach WHERE "Starting_year" >= 2013 OR "Coach_ID" < 1


Question: SELECT Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Description <> "Advertisement" INTERSECT SELECT Template_Type_Code FROM Templates WHERE "Template_ID" != 22


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


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


Question: SELECT MIN(vehicle_id), customer_id, MAX(lesson_status_code), lesson_date, staff_id, SUM(lesson_time) FROM Lessons WHERE lesson_date = "2018-03-05 20:05:33" OR lesson_time <> "2" AND "vehicle_id" >= 1 AND "price" >= 446.0 AND lesson_status_code = "Cancelled" AND "staff_id" < 1 AND "customer_id" <= 10 OR "lesson_id" <> 1 EXCEPT SELECT MIN(vehicle_id), customer_id, MAX(lesson_status_code), lesson_date, staff_id, SUM(lesson_time) FROM Lessons WHERE lesson_status_code != "Cancelled" AND "staff_id" <= 11 AND "price" <= 199.0 OR lesson_time != "9" AND "lesson_id" < 12 AND "vehicle_id" = 1


Question: SELECT amount_payment, payment_method_code, datetime_payment, customer_id FROM Customer_Payments WHERE "customer_id" < 11 AND "amount_payment" <= 3073.98 OR payment_method_code = "Direct Debit" EXCEPT SELECT amount_payment, payment_method_code, datetime_payment, customer_id FROM Customer_Payments WHERE "amount_payment" = 9886.62


Question: SELECT interface, dimensions, dpi FROM product WHERE interface = "USB 2.0" EXCEPT SELECT interface, dimensions, dpi FROM product WHERE interface != "USB 2.0"


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 MAX(Fname), AVG(Major), city_code, SUM(Advisor), Age, Sex, MAX(StuID) FROM Student WHERE Fname = "Eric" AND city_code != "NYC" OR Sex != "M" AND "Major" != 520 OR LName = "Pang" AND "StuID" < 1019 EXCEPT SELECT MAX(Fname), AVG(Major), city_code, SUM(Advisor), Age, Sex, MAX(StuID) FROM Student WHERE city_code <> "ATL" AND Sex != "F" AND LName != "Lee" AND "StuID" > 1022 AND "Advisor" = 7792 OR "Age" <= 17 OR "Major" >= 600

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


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 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 shipping_agent_name, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_code <> "FE" UNION ALL SELECT shipping_agent_name, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name <> "UPS" OR shipping_agent_description = "t"


Question: SELECT MIN(contestant_number) FROM CONTESTANTS WHERE "contestant_number" <= 6 AND contestant_name = "Nita Coster" UNION SELECT MIN(contestant_number) FROM VOTES WHERE created <> "2018-03-09 19:03:39" OR "contestant_number" != 5 OR "vote_id" <> 2


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


Question: SELECT document_id FROM Documents WHERE other_details != "h" OR shipping_agent_code = "US" UNION SELECT document_id FROM Documents_Mailed WHERE mailing_date != "1982-01-14 05:50:54"


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


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


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


Question: SELECT SUM(Template_Type_Code) FROM Ref_Template_Types WHERE Template_Type_Code = "AD" AND Template_Type_Description != "CV" UNION SELECT SUM(Template_Type_Code) FROM Ref_Template_Types WHERE Template_Type_Code = "CV"


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


Question: SELECT MAX(T1.Issues), T2.Publisher FROM book as T1 JOIN publication as T2 ON T1.Book_ID = T2.Book_ID WHERE Publisher <> "Pearson" GROUP BY Issues HAVING Publisher <> "Bertelsmann" OR Price <= 2000000.0


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


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID >= 7 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 <> 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 <> 7


Question: SELECT Id FROM car_makers WHERE Country = "3" OR FullName <> "Fiat" EXCEPT SELECT Id FROM cars_data WHERE "Cylinders" = 4 AND "Year" > 1976 OR "Edispl" = 85.0


Question: SELECT aid, distance FROM aircraft WHERE name = "Airbus A340-300" AND "aid" != 6 AND "distance" >= 8430 UNION ALL SELECT aid, distance FROM flight WHERE "aid" != 5 AND destination <> "Washington D.C." AND arrival_date <> "04/12/2005 11:15" OR "price" <> 220.98


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


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


Question: SELECT aid FROM aircraft WHERE name = "Lockheed L1011" AND "distance" <= 4010 UNION ALL SELECT aid FROM certificate WHERE "eid" < 356187925


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


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


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


Question: SELECT Continent, CountryName, CountryId FROM countries WHERE "Continent" <= 2 UNION ALL SELECT Continent, CountryName, CountryId FROM countries WHERE "CountryId" <> 9


Question: SELECT address_id, MIN(address_details) FROM Addresses WHERE address_details != "MX" AND "address_id" < 5 INTERSECT SELECT address_id, MIN(address_details) FROM Addresses WHERE "address_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 <= 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 >= 7 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 < 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 > 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 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 <= 9


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


Question: SELECT Rank, MIN(Gender) FROM coach WHERE "Club_ID" <> 3 OR "Coach_ID" != 2 EXCEPT SELECT Rank, MIN(Gender) FROM player WHERE Rank = "1st" AND "Player_ID" > 4


Question: SELECT aid FROM aircraft WHERE "aid" >= 6 EXCEPT SELECT aid FROM certificate WHERE "aid" = 14


Question: SELECT MIN(Years_Working) FROM school_bus WHERE "School_ID" <= 7 UNION ALL SELECT MIN(Years_Working) FROM school_bus WHERE If_full_time = "T" AND "Years_Working" <> 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 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 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 <= 9


Question: SELECT name FROM useracct WHERE "u_id" = 3 AND name != "Emily" INTERSECT SELECT name FROM useracct WHERE name = "Terry"


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 head_ID FROM head WHERE born_state = "Alabama" OR name = "Jeff Maggert" OR "head_ID" > 3 UNION ALL SELECT head_ID FROM management WHERE temporary_acting != "No" AND "head_ID" = 6 AND "department_ID" >= 2


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


Question: SELECT Comptroller, AVG(US_Senate), Party_ID, MIN(Lieutenant_Governor), Attorney_General FROM party WHERE US_Senate = "(no election)" OR Lieutenant_Governor = "Dennis Mehiel" OR Attorney_General <> "Eliot Spitzer" OR Party != "Independence" AND "Year" <> 1998.0 AND Comptroller != "Alan Hevesi" UNION SELECT Comptroller, AVG(US_Senate), Party_ID, MIN(Lieutenant_Governor), Attorney_General FROM party WHERE "Year" > 2006.0


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


Question: SELECT document_id FROM Circulation_History WHERE "document_id" <> 2 AND "draft_number" >= 2 OR "employee_id" >= 8 AND "copy_number" = 10 UNION ALL SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" <= 0 AND "document_id" != 20 AND mailing_date <> "2007-01-01 22:32:11"


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 COUNT(i_id), AVG(a_id) FROM review WHERE "rating" < 7 AND "i_id" < 7 OR "a_id" <> 3 EXCEPT SELECT COUNT(i_id), AVG(a_id) FROM review WHERE "rating" != 5 AND "u_id" < 2


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 MIN(employee_id) FROM Circulation_History WHERE "copy_number" <= 15 AND "employee_id" < 1 UNION SELECT MIN(employee_id) FROM Employees WHERE employee_name != "Koby" AND other_details != "b" AND role_code <> "ED" OR "employee_id" <> 3


Question: SELECT MAX(id) FROM albums WHERE "id" <= 139 AND "artist_id" < 10 UNION SELECT MAX(id) FROM media_types WHERE "id" >= 5


Question: SELECT Continent FROM continents WHERE Continent <> "africa" AND "ContId" > 1 EXCEPT SELECT Continent FROM countries WHERE CountryName != "uk" AND "Continent" >= 5


Question: SELECT Num_Employees FROM department WHERE "Ranking" = 13 OR "Num_Employees" > 30266.0 EXCEPT SELECT Num_Employees FROM department WHERE Name = "Interior" AND "Budget_in_Billions" <= 62.8 AND Creation != "1789"


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


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


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


Question: SELECT Maker, Id FROM car_makers WHERE Maker = "subaru" OR Country = "5" AND FullName <> "Opel" AND "Id" <= 23 UNION SELECT Maker, Id FROM car_makers WHERE Country <> "4"


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


Question: SELECT Company_ID FROM employment WHERE "Year_working" = 4 UNION ALL SELECT Company_ID FROM employment WHERE "Company_ID" <> 7 AND "People_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 > 10


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


Question: SELECT Rank, SUM(Club_ID) FROM coach WHERE "Coach_ID" >= 1 UNION SELECT Rank, SUM(Club_ID) FROM match_result WHERE "Rank" >= 2 OR "Gold" > 13 OR "Club_ID" = 6 AND "Bronze" <= 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 >= 9


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


Question: SELECT document_id FROM Circulation_History WHERE "employee_id" != 2 UNION SELECT document_id FROM Documents WHERE document_type_code <> "CD" AND receipt_date != "2005-09-30 00:10:02" OR receipt_number <> "79"


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 Height FROM people WHERE Name != "Semen Poltavskiy" OR "Height" <> 205.0 AND Birth_Date = "May 26, 1986" OR Nationality <> "Russia" EXCEPT SELECT Height FROM people WHERE "Height" <= 182.0


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 1 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID <> 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 = 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 Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 6 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 7


Question: SELECT 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 CountryName, Continent, CountryId FROM countries WHERE CountryName <> "australia" OR "Continent" > 1 AND "CountryId" <> 6 INTERSECT SELECT CountryName, Continent, CountryId FROM countries WHERE CountryName <> "usa" OR "CountryId" < 1 OR "Continent" <> 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 < 7


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID > 7 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 = 3 INTERSECT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 2


Question: SELECT Paragraph_ID, Other_Details, Document_ID, Paragraph_Text FROM Paragraphs WHERE "Document_ID" = 2394 AND Paragraph_Text = "Korea" UNION SELECT Paragraph_ID, Other_Details, Document_ID, Paragraph_Text FROM Paragraphs WHERE "Document_ID" <= 3540024 AND Other_Details = "None" AND "Paragraph_ID" < 7


Question: SELECT School_ID, School, Type FROM school WHERE School = "Columbia University" AND Grade != "Kindergarten" OR Type = "Private" OR "School_ID" = 4 OR Location <> "Jakarta, Indonesia" UNION SELECT School_ID, School, Type FROM school WHERE "School_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 SUM(city), state_province_county FROM Addresses WHERE country <> "USA" AND zip_postcode <> "00005" AND "address_id" < 13 AND line_1_number_building <> "00704 Zoe Alley" OR state_province_county != "Louisiana" AND city != "New Bernieceburgh" INTERSECT SELECT SUM(city), state_province_county FROM Addresses WHERE zip_postcode != "22194" OR "address_id" >= 11 OR country != "USA" OR city != "South Eugene" AND line_1_number_building = "4834 Schaefer Light Suite 947" AND state_province_county = "Washington"


Question: SELECT PetID, StuID FROM Has_Pet WHERE "StuID" = 1002 EXCEPT SELECT PetID, StuID FROM Has_Pet WHERE "PetID" <= 2002 AND "StuID" >= 1002


Question: SELECT MAX(Club_ID) FROM club WHERE "Club_ID" <= 5 AND "Start_year" != 2005 OR Region <> "USA" OR Club_name = "Helsingborgs IF" UNION ALL SELECT MAX(Club_ID) FROM match_result WHERE "Big_Silver" < 14 AND "Small_Silver" = 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 < 1 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 7


Question: SELECT mailed_to_address_id FROM Documents_Mailed WHERE "mailed_to_address_id" = 5 OR "document_id" > 12 OR mailing_date = "2007-01-01 22:32:11" INTERSECT SELECT mailed_to_address_id FROM Documents_Mailed WHERE "mailed_to_address_id" < 8


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 document_id FROM Documents WHERE shipping_agent_code != "UP" OR receipt_date = "1982-09-27 14:52:15" AND document_type_code = "Hard Drive" OR receipt_number <> "93" AND "document_id" > 17 AND document_status_code != "working" OR other_details != "w" UNION SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_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 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 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 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 Country FROM car_makers WHERE Maker != "citroen" AND Country = "7" OR FullName = "Honda" OR "Id" < 3 NOT IN (SELECT Country FROM car_makers WHERE "Id" < 16 AND Maker <> "renault" OR Country <> "1" AND FullName != "Ford Motor Company")


Question: SELECT born_state, MAX(age), head_ID, name FROM head WHERE born_state != "Delaware" UNION ALL SELECT born_state, MAX(age), head_ID, name FROM head WHERE name != "Franklin Langham" OR "age" > 68.0


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


Question: SELECT Price, Publication_ID, Publication_Date, Book_ID, Publisher FROM publication WHERE Publisher != "Pearson" UNION SELECT Price, Publication_ID, Publication_Date, Book_ID, Publisher FROM publication WHERE Publication_Date = "March 2007" OR "Price" = 3000000.0 AND "Book_ID" = 5 OR "Publication_ID" > 7 OR Publisher <> "Pearson"


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


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


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


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


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


Question: SELECT Document_ID, Paragraph_ID FROM Paragraphs WHERE Other_Details != "None" OR "Paragraph_ID" <> 65 AND "Document_ID" >= 16514113 UNION ALL SELECT Document_ID, Paragraph_ID FROM Paragraphs WHERE Paragraph_Text = "Palestinian Territory" AND "Document_ID" >= 2394 AND "Paragraph_ID" > 608931827 AND Other_Details != "None"


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


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


Question: SELECT Model FROM car_names WHERE Make != "chevrolet chevelle malibu classic" EXCEPT SELECT Model FROM model_list WHERE "ModelId" < 13 OR "Maker" >= 4 OR Model <> "amc"


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


Question: SELECT 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 Name FROM employee WHERE "Age" >= 28 UNION ALL SELECT Name FROM shop WHERE Name <> "FC KooTeePee" AND Location <> "Espoo" AND "Number_products" <> 5000 OR Manager_name = "Mika Laurikainen"


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


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


Question: SELECT salary FROM employee WHERE "eid" < 552455348 AND name <> "John Williams" UNION SELECT salary FROM employee WHERE "salary" != 84476


Question: SELECT COUNT(Is_full_time), MAX(Shop_ID) FROM hiring WHERE Start_from <> "2008" OR "Shop_ID" < 5 EXCEPT SELECT COUNT(Is_full_time), MAX(Shop_ID) FROM hiring WHERE "Employee_ID" > 1 OR "Shop_ID" <> 2 OR Start_from != "2013"


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 Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Code <> "BK" OR Template_Type_Description != "Advertisement" UNION SELECT Template_Type_Code FROM Templates WHERE Date_Effective_From <> "1986-11-14 12:20:18" OR Template_Type_Code <> "PPT" OR Template_Details != "" OR "Template_ID" != 7 OR "Version_Number" <> 8 AND Date_Effective_To <> "2008-01-05 14:19:28"


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


Question: SELECT StuID FROM Member_of_club WHERE Position != "President" OR "StuID" > 1007 OR "ClubID" >= 2 UNION SELECT StuID FROM Student WHERE "Advisor" = 8722 AND "Major" > 600 AND Sex = "M"


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 AVG(Employee_ID), City, MIN(Name), MAX(Age) FROM employee WHERE "Age" >= 30 EXCEPT SELECT AVG(Employee_ID), City, MIN(Name), MAX(Age) FROM employee WHERE City != "Bath"

AVG(Employee_ID) City MIN(Name) MAX(Age)


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 feature_type_code FROM Other_Available_Features WHERE feature_type_code = "Amenity" AND feature_name <> "AirCon" EXCEPT SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_name <> "Amenity, eg Pool." OR feature_type_code <> "Amenity"


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


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


Question: SELECT datetime_payment, amount_payment FROM Customer_Payments WHERE "amount_payment" != 6970.98 OR payment_method_code = "Direct Debit" INTERSECT SELECT datetime_payment, amount_payment FROM Customer_Payments WHERE datetime_payment = "2018-03-06 21:36:41" OR "customer_id" >= 14 OR payment_method_code != "Direct Debit"


Question: SELECT COUNT(T1.amount_payment), T2.cell_mobile_phone_number FROM Customer_Payments as T1 JOIN Customers as T2 ON T1.customer_id = T2.customer_id WHERE payment_method_code <> "Direct Debit" AND datetime_payment = "2018-02-06 13:35:58" AND customer_status_code = "Good Customer" AND phone_number <> "(662)490-3108" OR "amount_payment" = 1708.18 AND date_became_customer = "2017-10-05 14:15:46" AND date_of_birth = "1998-09-18 04:45:01" OR "amount_outstanding" >= 9332.0 OR email_address = "kroberts@example.org"


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 School_id FROM School WHERE "Enrollment" = 287 OR Mascot = "Falcons" UNION ALL SELECT School_id FROM budget WHERE "Invested" <> 8335 AND "total_budget_percent_invested" != 2.7


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 Delegate, Election_ID, Committee, Counties_Represented, Party, First_Elected, District FROM election WHERE "Party" >= 1 OR Counties_Represented = "09.1 9A" UNION SELECT Delegate, Election_ID, Committee, Counties_Represented, Party, First_Elected, District FROM election WHERE Counties_Represented <> "13"

DeBoy, Steven J. Sr. Steven J. DeBoy, Sr.

Malone, James E. Jr. James E. Malone, Jr.


Question: SELECT AVG(staff_id) FROM Lessons WHERE "staff_id" >= 4 OR "customer_id" >= 10 AND lesson_status_code <> "Cancelled" OR "vehicle_id" > 1 AND lesson_date = "2018-02-28 10:55:36" OR lesson_time <> "9" OR "price" >= 277.0 OR "lesson_id" <= 1 UNION ALL SELECT AVG(staff_id) FROM Staff WHERE "staff_id" <> 3 AND date_joined_staff = "2016-06-06 08:54:28" OR nickname = "thompson.constantin" AND last_name = "Mertz" OR date_of_birth <> "1998-04-27 12:55:05"


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


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


Question: SELECT PetID, pet_age, weight FROM Pets WHERE "PetID" >= 2003 AND "pet_age" > 1 UNION SELECT PetID, pet_age, weight FROM Pets WHERE "PetID" > 2001 AND "weight" <> 13.4


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


Question: SELECT product_id, pages_per_minute_color, product, dpi, interface FROM product WHERE "pages_per_minute_color" < 30.0 OR "product_id" <> 3 OR dimensions = "298 x 209 x 99" AND product = "Fujitsu fi-6130 A4 Series Scanner" OR "dpi" < 600.0 OR max_page_size <> "A4" UNION ALL SELECT product_id, pages_per_minute_color, product, dpi, interface FROM product WHERE max_page_size <> "A4"


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


Question: SELECT Budget_in_Billions, MAX(Department_ID) FROM department GROUP BY Budget_in_Billions HAVING MAX(Department_ID) <= 9 UNION ALL SELECT Budget_in_Billions, MAX(Department_ID) FROM department GROUP BY Budget_in_Billions HAVING MAX(Department_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 <= 9


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


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


Question: SELECT AVG(document_id), COUNT(copy_number), AVG(draft_number) FROM Draft_Copies WHERE "draft_number" >= 20 AND "document_id" > 1 OR "copy_number" = 10 UNION ALL SELECT AVG(document_id), COUNT(copy_number), AVG(draft_number) FROM Draft_Copies WHERE "copy_number" <> 4 AND "draft_number" < 8 OR "document_id" = 23


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 Age, People_ID FROM people WHERE "People_ID" >= 5 OR Nationality <> "United States" AND Graduation_College = "California" INTERSECT SELECT Age, People_ID FROM people WHERE "People_ID" != 2 AND Graduation_College <> "Virginia" AND "Age" < 37 AND Name != "Jerry Corcoran" AND Nationality <> "United States"


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


Question: SELECT MIN(Employee_ID) FROM employee WHERE City = "Wasps" AND "Age" <> 29 OR Name <> "Steve Borthwick" AND "Employee_ID" = 5 UNION SELECT MIN(Employee_ID) FROM hiring WHERE Is_full_time != "T"


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 pages_per_minute_color, dpi, product, MAX(dimensions), product_id FROM product WHERE dimensions = "300 x 50 x 45" OR max_page_size <> "A4" OR product <> "Canon imageFORMULA P-150" AND "pages_per_minute_color" > 10.0 OR "product_id" < 2 INTERSECT SELECT pages_per_minute_color, dpi, product, MAX(dimensions), product_id FROM product WHERE "dpi" = 600.0 OR interface <> "USB 2.0" AND "pages_per_minute_color" <> 28.0


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


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


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


Question: SELECT Employee_ID FROM evaluation WHERE Year_awarded != "2011" AND Employee_ID <> "1" OR "Bonus" != 3000.0 EXCEPT SELECT Employee_ID FROM hiring WHERE "Employee_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 != 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 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 != 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 > 12 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT employee_id, other_details FROM Employees WHERE role_code <> "PR" EXCEPT SELECT employee_id, other_details FROM Employees WHERE "employee_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 > 10


Question: SELECT document_id FROM Documents_Mailed WHERE "document_id" > 12 OR mailing_date = "2007-01-01 22:32:11" UNION ALL SELECT document_id FROM Draft_Copies WHERE "draft_number" = 2 OR "document_id" >= 20 OR "copy_number" > 10


Question: SELECT Branch_ID, Member_ID FROM membership_register_branch WHERE Register_Year != "2016" EXCEPT SELECT Branch_ID, Member_ID FROM purchase WHERE "Member_ID" = 3