Question: SELECT shipping_agent_name, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_code = "UP" OR shipping_agent_name = "USPS" AND shipping_agent_description <> "k" UNION ALL SELECT shipping_agent_name, shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_description = "t" OR shipping_agent_code <> "SH" AND shipping_agent_name = "Fedex"


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


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


Question: SELECT COUNT(Description), COUNT(Aircraft_ID), COUNT(Total_disk_area), COUNT(Aircraft), Max_Gross_Weight FROM aircraft WHERE Max_Gross_Weight = "3,200 lb (1,451 kg)" AND Max_disk_Loading != "3.7 lb/ft² (18 kg/m²)" AND "Aircraft_ID" <> 5 OR Total_disk_area != "5,655 ft² (526 m²)" GROUP BY Max_Gross_Weight HAVING COUNT(Aircraft) < 1 OR COUNT(Total_disk_area) > 1 OR COUNT(Aircraft_ID) >= 1 UNION SELECT COUNT(Description), COUNT(Aircraft_ID), COUNT(Total_disk_area), COUNT(Aircraft), Max_Gross_Weight FROM aircraft WHERE "Aircraft_ID" >= 5 AND Max_Gross_Weight != "123,500 lb (56,000 kg)" OR Description = "Tandem rotor helicopter" OR Aircraft != "Robinson R-22" OR Total_disk_area = "872 ft² (81.1 m²)" OR Max_disk_Loading <> "8.8 lb/ft² (43 kg/m²)" GROUP BY Max_Gross_Weight HAVING COUNT(Description) < 1


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


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


Question: SELECT Player_ID FROM player WHERE Gender <> "M" OR "Votes" >= 2353 INTERSECT SELECT Player_ID FROM player_coach WHERE "Coach_ID" != 1


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


Question: SELECT AVG(AllergyType) FROM Allergy_Type WHERE AllergyType <> "food" UNION ALL SELECT AVG(AllergyType) FROM Allergy_Type WHERE AllergyType <> "animal" OR Allergy = "Grass Pollen"


Question: SELECT role_code FROM Employees WHERE role_code != "PT" OR other_details <> "u" UNION ALL SELECT role_code FROM Roles WHERE role_description != "Manager"


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


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


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


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


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


Question: SELECT T1.Id, T2.Year FROM car_makers as T1 JOIN cars_data as T2 ON T1.Id == T2.Id GROUP BY Cylinders HAVING FullName <> "Subaru" AND Maker <> "renault" AND Weight >= 3459 OR Accelerate <> 12.2 OR Cylinders = 8 AND Edispl <> 351.0 OR Horsepower <> "180" AND MPG = "13" AND Year >= 1974 AND Country <> "3"


Question: SELECT Major, Age, AVG(Sex), Fname, Advisor, city_code FROM Student WHERE "Advisor" <> 8722 AND city_code <> "LON" OR Fname = "William" OR "Major" != 600 AND LName = "Davis" AND "Age" < 20 INTERSECT SELECT Major, Age, AVG(Sex), Fname, Advisor, city_code FROM Student WHERE LName != "Thornton"

Major Age AVG(Sex) Fname Advisor city_code


Question: SELECT Id FROM car_makers WHERE Maker = "honda" AND FullName <> "Nissan Motors" OR "Id" <= 23 OR Country <> "8" INTERSECT SELECT Id FROM cars_data WHERE "Weight" <> 2774 AND "Id" <> 197 AND "Cylinders" != 6 OR "Accelerate" < 12.0 AND "Edispl" > 91.0 OR "Year" <= 1980 AND Horsepower != "75" OR MPG != "26.5"


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


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


Question: SELECT COUNT(Sex), city_code, SUM(LName), Fname, MAX(Age), Major, StuID, Advisor FROM Student WHERE "Age" != 17 AND city_code != "CHI" OR LName != "Brown" AND "Major" < 520 AND "Advisor" >= 1148 OR Sex != "F" AND "StuID" != 1006 EXCEPT SELECT COUNT(Sex), city_code, SUM(LName), Fname, MAX(Age), Major, StuID, Advisor FROM Student WHERE "StuID" <> 1014 AND "Advisor" >= 7134

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


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


Question: SELECT 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 Party, Lieutenant_Governor FROM party WHERE "Year" < 2006.0 UNION SELECT Party, Lieutenant_Governor FROM party WHERE "Year" = 2006.0 AND Lieutenant_Governor != "Dennis Mehiel" AND "Party_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 <= 11 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 4


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


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


Question: SELECT SUM(company_id), AVG(Velocity) FROM flight WHERE Pilot = "Thompson" AND Vehicle_Flight_number <> "M2-F1 #1" OR "Altitude" <> 3650.0 AND Date = "September 3, 1963" UNION ALL SELECT SUM(company_id), AVG(Velocity) FROM flight WHERE Vehicle_Flight_number = "M2-F1 #61" OR Date <> "March 28, 1966" AND "Velocity" <> 240.0 OR Pilot != "Peterson"


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 aid FROM aircraft WHERE "aid" >= 3 UNION SELECT aid FROM flight WHERE "distance" < 1749 OR "price" <= 425.98 AND arrival_date <> "04/12/2005 05:03" OR destination != "New York" AND origin = "Los Angeles" AND "flno" > 99 OR departure_date != "04/12/2005 07:03"


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 departure_date, destination, price, flno, aid, distance, origin, arrival_date FROM flight WHERE origin = "Los Angeles" OR departure_date = "04/12/2005 08:32" OR "price" >= 375.23 UNION ALL SELECT departure_date, destination, price, flno, aid, distance, origin, arrival_date FROM flight WHERE "aid" <= 1 AND arrival_date <> "04/12/2005 03:55" OR departure_date <> "04/12/2005 09:15" OR "price" <= 375.23 AND destination != "Chicago" OR origin <> "Chicago"

departure_date destination price flno aid distance origin arrival_date


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


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


Question: SELECT id FROM albums WHERE "id" < 13 UNION SELECT id FROM media_types WHERE "id" <= 2


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


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


Question: SELECT MIN(document_type_code) FROM Ref_Document_Types WHERE document_type_code != "Hard Drive" UNION ALL SELECT MIN(document_type_code) FROM Ref_Document_Types WHERE document_type_description = "f" AND document_type_code <> "CD"


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


Question: SELECT Employee_ID FROM employee WHERE City <> "Bristol" UNION ALL SELECT Employee_ID FROM hiring WHERE "Shop_ID" >= 1 AND Start_from = "2010" OR Is_full_time != "T"


Question: SELECT MAX(T1.Id), T2.MPG FROM car_makers as T1 JOIN cars_data as T2 ON T1.Id = T2.Id WHERE "Year" >= 1974 AND Horsepower = "150" AND MPG <> "38" OR "Edispl" > 140.0 OR "Accelerate" = 16.0 OR FullName <> "Citroen" OR Maker = "citroen"


Question: SELECT Advisor, StuID FROM Student WHERE "Major" <= 540 OR "StuID" >= 1031 UNION SELECT Advisor, StuID FROM Student WHERE "Age" <> 20 OR "Major" <> 600 OR "Advisor" != 5718 OR Fname = "Lisa" AND city_code = "PIT" OR Sex != "M"


Question: SELECT Years_Working, Driver_ID FROM school_bus WHERE "School_ID" >= 1 AND If_full_time <> "T" EXCEPT SELECT Years_Working, Driver_ID FROM school_bus WHERE "Driver_ID" < 10 AND "Years_Working" <= 2


Question: SELECT customer_id FROM Customer_Payments WHERE datetime_payment = "2018-02-19 09:06:29" AND "amount_payment" <> 6782.84 UNION SELECT customer_id FROM Customers WHERE phone_number != "192-395-2411" OR cell_mobile_phone_number = "081-097-3684" AND email_address <> "asha.kilback@example.org"


Question: SELECT vehicle_details, vehicle_id FROM Vehicles WHERE "vehicle_id" <> 2 AND vehicle_details = "Van" INTERSECT SELECT vehicle_details, vehicle_id FROM Vehicles WHERE "vehicle_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 <= 3


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


Question: SELECT T1.i_id, T2.rank FROM item as T1 JOIN review as T2 ON T1.i_id == T2.i_id GROUP BY rank HAVING rank < 3 AND a_id <= 7


Question: SELECT District_ID FROM district WHERE "City_Population" = 530438.0 OR "City_Area" <> 10.0 AND "District_ID" <= 2 AND Headquartered_City != "Jhelum City" UNION ALL SELECT District_ID FROM store_district WHERE "Store_ID" <= 1 AND "District_ID" < 11


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(aid), MAX(distance), name FROM aircraft WHERE "aid" >= 5 AND name != "Airbus A340-300" AND "distance" != 4103 GROUP BY name HAVING MIN(aid) >= 13 EXCEPT SELECT MIN(aid), MAX(distance), name FROM aircraft WHERE "aid" >= 5 AND "distance" < 7120 OR name != "Boeing 767-400ER" GROUP BY name HAVING MAX(distance) = 3383


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" GROUP BY ICAO HAVING City = "Akureyri" AND MIN(company_id) < 2 AND name <> "Ted Stevens Airport" AND IATA = "BCN" OR Vehicle_Flight_number = "M2-F1 #61" AND SUM(Velocity) >= 240.0 OR airport_id <> 3 OR Pilot = "Thompson" AND MIN(Altitude) <= 3650.0 AND Country = "Netherlands" OR ICAO = "LEBL"


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


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


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


Question: SELECT Budgeted, Year, total_budget_percent_invested, total_budget_percent_budgeted, School_id FROM budget WHERE "School_id" <= 4 AND "total_budget_percent_invested" < 2.2 AND "Budgeted" >= 6803 AND "Invested" > 95542 OR "total_budget_percent_budgeted" <= 2.0 UNION ALL SELECT Budgeted, Year, total_budget_percent_invested, total_budget_percent_budgeted, School_id FROM budget WHERE "Year" >= 2001 OR "total_budget_percent_invested" >= 2.2 OR "Budgeted" <> 3666 AND "Invested" != 8335


Question: SELECT head_ID FROM head WHERE name != "Billy Mayfair" OR "head_ID" = 9 EXCEPT SELECT head_ID FROM management WHERE temporary_acting = "No" AND "head_ID" > 6


Question: SELECT Store_ID FROM store WHERE "Area_size" = 21.73 INTERSECT SELECT Store_ID FROM store_district WHERE "Store_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 Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <> 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID != 7


Question: SELECT Continent FROM continents WHERE "ContId" >= 3 UNION ALL SELECT Continent FROM countries WHERE "Continent" != 4 OR CountryName != "uk" OR "CountryId" < 6


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 document_id FROM Document_Drafts WHERE "document_id" > 12 OR "draft_number" > 20 INTERSECT SELECT document_id FROM Documents WHERE document_type_code = "Hard Drive" AND receipt_number != "93" OR "document_id" >= 2 OR receipt_date = "1983-09-26 09:32:56" AND document_status_code <> "done" AND shipping_agent_code != "UP" AND other_details <> "x"


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


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


Question: SELECT eid FROM certificate WHERE "eid" != 552455318 OR "aid" < 12 UNION SELECT eid FROM employee WHERE "eid" <> 574489457 AND name = "Eric Cooper" OR "salary" > 212156


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


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


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


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


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


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


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


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


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID != 6 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 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 SUM(T1.area_code), T2.phone_number FROM AREA_CODE_STATE as T1 JOIN VOTES as T2 ON T1.state = T2.state WHERE created <> "2018-03-09 19:03:21"


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


Question: SELECT SUM(Model), Maker, ModelId FROM model_list WHERE Model != "audi" AND "ModelId" <> 31 AND "Maker" <> 5 UNION ALL SELECT SUM(Model), Maker, ModelId FROM model_list WHERE Model <> "dodge" AND "Maker" < 5 OR "ModelId" <= 12


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


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


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


Question: SELECT a_id, u_id, rating FROM review WHERE "u_id" != 2 OR "a_id" = 2 INTERSECT SELECT a_id, u_id, rating FROM review WHERE "rating" <= 5 AND "u_id" = 1 OR "a_id" <= 3


Question: SELECT copy_number, document_id, draft_number FROM Circulation_History WHERE "document_id" <> 2 INTERSECT SELECT copy_number, document_id, draft_number FROM Draft_Copies WHERE "copy_number" <= 4 OR "document_id" >= 20


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


Question: SELECT Headquartered_City, COUNT(District_name), District_ID, COUNT(City_Area) FROM district WHERE "City_Area" < 10.0 UNION ALL SELECT Headquartered_City, COUNT(District_name), District_ID, COUNT(City_Area) FROM district WHERE "City_Area" = 147.0


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


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


Question: SELECT aid, COUNT(name), SUM(distance) FROM aircraft GROUP BY aid HAVING SUM(distance) < 2128 AND COUNT(name) >= 1 UNION SELECT aid, COUNT(name), SUM(distance) FROM aircraft GROUP BY aid HAVING COUNT(name) > 1


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


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


Question: SELECT AVG(Allergy), AllergyType FROM Allergy_Type WHERE Allergy <> "Dog" INTERSECT SELECT AVG(Allergy), AllergyType FROM Allergy_Type WHERE AllergyType != "animal" AND Allergy <> "Ragweed"


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


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


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


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


Question: SELECT Shop_ID FROM hiring WHERE Start_from != "2012" OR "Employee_ID" < 4 UNION SELECT Shop_ID FROM shop WHERE District != "Jakobstads Centralplan" OR "Number_products" >= 1600 OR Name = "FF Jaro"


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 AVG(Member_ID) FROM member WHERE Card_Number != "RE95" AND "Level" = 6 OR Name = "Matt Lentz" OR "Member_ID" >= 2 UNION ALL SELECT AVG(Member_ID) FROM purchase WHERE Branch_ID <> "5" AND Year <> "2018"


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


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


Question: SELECT PetID FROM Has_Pet WHERE "StuID" <> 1002 INTERSECT SELECT PetID FROM Pets WHERE PetType = "cat" AND "weight" >= 9.3


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


Question: SELECT 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 Final_Table_Made, Earnings, Poker_Player_ID, People_ID, Best_Finish, Money_Rank FROM poker_player WHERE "Poker_Player_ID" <= 2 AND "Final_Table_Made" >= 10.0 UNION ALL SELECT Final_Table_Made, Earnings, Poker_Player_ID, People_ID, Best_Finish, Money_Rank FROM poker_player WHERE "Poker_Player_ID" <> 1 AND "Final_Table_Made" != 10.0 OR "People_ID" >= 2


Question: SELECT MIN(T1.City_Area), T2.Store_ID FROM district as T1 JOIN store_district as T2 ON T1.District_ID = T2.District_ID WHERE "City_Population" <> 530438.0 OR "Store_ID" <= 1 AND "City_Area" <> 22.0 AND District_name <> "Chiniot District" GROUP BY Store_ID HAVING Store_ID > 1 AND City_Population = 134936.0 OR Headquartered_City <> "Khanewal City" AND District_name <> "Khanewal District"


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


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


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


Question: SELECT Budget_in_Billions, COUNT(Creation) FROM department WHERE "Ranking" >= 5 AND "Budget_in_Billions" <> 439.3 OR "Num_Employees" < 112557.0 AND Name != "Homeland Security" AND Creation = "1989" UNION ALL SELECT Budget_in_Billions, COUNT(Creation) FROM department WHERE "Ranking" != 4 OR Creation != "2002" AND "Num_Employees" > 10600.0 OR "Budget_in_Billions" < 62.8 AND Name != "Housing and Urban Development"


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 MIN(endowment_id) FROM endowment WHERE donator_name <> "Monte Plata" OR "amount" < 8.43 OR "endowment_id" <> 9 UNION SELECT MIN(endowment_id) FROM endowment WHERE "endowment_id" >= 10 AND donator_name = "San José de Ocoa" AND "amount" > 9.73 AND "School_id" >= 3


Question: SELECT Branch_ID FROM branch WHERE Address_road <> "Abbey Rise" AND Name != "Stanley" OR "Branch_ID" > 5 AND membership_amount <> "56" UNION ALL SELECT Branch_ID FROM purchase WHERE "Member_ID" <= 1 AND Branch_ID != "1" AND Year <> "2018" AND "Total_pounds" <= 20.99


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


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


Question: SELECT Gender FROM coach WHERE "Rank" < 4 AND "Coach_ID" > 4 OR Coach_name <> "James Wong" UNION SELECT Gender FROM player WHERE Sponsor_name = "Charleswood—St. James—Assiniboia" AND Player_name <> "Matt Schaubroeck" OR "Player_ID" != 8 OR Residence != "Winnipeg" AND Occupation <> "Retired" OR Rank <> "2nd" AND Gender = "F"


Question: SELECT SUM(T1.ClubID), T2.ClubID FROM Club as T1 JOIN Member_of_club as T2 ON T1.ClubID = T2.ClubID WHERE ClubLocation <> "HHH" OR ClubName = "Tennis Club" AND Position <> "Teaching Coordinator" GROUP BY Position HAVING StuID = 1007


Question: SELECT Region, MAX(Club_ID), COUNT(Club_name), COUNT(Start_year) FROM club WHERE "Start_year" >= 2001 AND Club_name <> "AIK" OR "Club_ID" = 5 OR Region <> "Korea" GROUP BY Region HAVING COUNT(Start_year) = 1 OR COUNT(Club_name) > 2 UNION SELECT Region, MAX(Club_ID), COUNT(Club_name), COUNT(Start_year) FROM club WHERE "Club_ID" != 2 GROUP BY Region HAVING COUNT(Club_name) >= 1


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


Question: SELECT AVG(Year) FROM budget WHERE Budget_invested_percent <> "122.5" EXCEPT SELECT AVG(Year) FROM budget WHERE "Year" != 2006


Question: SELECT shipping_agent_code FROM Documents WHERE "document_id" != 3 AND shipping_agent_code = "UP" AND receipt_date <> "1996-07-27 03:30:40" AND document_type_code != "Hard Drive" OR document_status_code != "working" EXCEPT SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_code <> "UP" AND shipping_agent_description = "q"


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


Question: SELECT AVG(role_code) FROM Employees WHERE employee_name != "Erling" AND role_code = "ED" OR "employee_id" != 1 OR other_details != "b" INTERSECT SELECT AVG(role_code) FROM Roles WHERE role_code = "ED"


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


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


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


Question: SELECT 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 COUNT(id), AVG(Principal_activities), Group_Equity_Shareholding, MIN(name), MAX(Incorporated_in), MIN(Type) FROM operate_company WHERE Incorporated_in != "Hong Kong" OR name != "Cathay Pacific Holidays" OR Principal_activities != "Cargo airline" UNION SELECT COUNT(id), AVG(Principal_activities), Group_Equity_Shareholding, MIN(name), MAX(Incorporated_in), MIN(Type) FROM operate_company WHERE "id" <> 12 OR "Group_Equity_Shareholding" < 100.0 OR Principal_activities != "Laundry" AND Type <> "Joint Venture"


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 SUM(Total_disk_area), Max_disk_Loading, AVG(Aircraft_ID) FROM aircraft WHERE Total_disk_area = "5,655 ft² (526 m²)" AND Max_Gross_Weight != "3,200 lb (1,451 kg)" AND Description <> "Heavy-lift helicopter" AND Aircraft = "Robinson R-22" EXCEPT SELECT SUM(Total_disk_area), Max_disk_Loading, AVG(Aircraft_ID) FROM aircraft WHERE Aircraft <> "CH-47D Chinook" AND Description <> "Light utility helicopter" AND Max_disk_Loading <> "3.7 lb/ft² (18 kg/m²)" AND Max_Gross_Weight <> "1,370 lb (635 kg)"


Question: SELECT Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Code <> "PP" OR Template_Type_Description != "Paper" INTERSECT SELECT Template_Type_Code FROM Templates WHERE Date_Effective_To = "2015-09-06 01:08:44" AND "Version_Number" <> 4 AND "Template_ID" <> 6 OR Template_Details <> ""


Question: SELECT beds, COUNT(bedType), RoomId, basePrice FROM Rooms WHERE "maxOccupancy" <> 2 OR "basePrice" < 175 OR "beds" = 2 AND decor != "rustic" AND bedType = "Double" UNION ALL SELECT beds, COUNT(bedType), RoomId, basePrice FROM Rooms WHERE "beds" > 2 AND bedType = "King" AND "maxOccupancy" != 4


Question: SELECT MAX(first_name), date_of_birth, last_name FROM Customers WHERE "customer_id" <> 7 OR date_became_customer = "2016-04-08 00:28:15" OR customer_status_code = "Bad Customer" OR email_address = "afranecki@example.com" OR last_name <> "Spinka" OR cell_mobile_phone_number = "1-387-258-1016x96963" AND first_name != "Genevieve" EXCEPT SELECT MAX(first_name), date_of_birth, last_name FROM Staff WHERE middle_name != "Amara" OR nickname = "thompson.constantin"


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


Question: SELECT employee_id FROM Circulation_History WHERE "document_id" < 10 AND "copy_number" != 5 INTERSECT SELECT employee_id FROM Employees WHERE employee_name != "Erling" OR "employee_id" = 5 OR other_details != "f"


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


Question: SELECT SUM(Age), COUNT(Fname), LName, Major, SUM(Sex) FROM Student WHERE Fname <> "George" OR "Advisor" < 5718 OR "Age" = 22 UNION SELECT SUM(Age), COUNT(Fname), LName, Major, SUM(Sex) FROM Student WHERE "Age" != 17 OR Sex = "M" AND city_code != "PIT"

SUM(Age) COUNT(Fname) LName Major SUM(Sex)


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


Question: SELECT Other_Details, Document_ID FROM Documents WHERE "Document_ID" != 3540024 OR Other_Details = "None" EXCEPT SELECT Other_Details, Document_ID FROM Paragraphs WHERE Other_Details != "None" OR "Paragraph_ID" > 9946 OR Paragraph_Text != "Micronesia"


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


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


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


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


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


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


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


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


Question: SELECT T1.Aircraft_ID, MIN(T2.Aircraft_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 != 12 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID >= 9


Question: SELECT AVG(created), MIN(vote_id), MIN(state), phone_number FROM VOTES WHERE "contestant_number" <> 5 OR "vote_id" <= 5 AND "phone_number" != 5112677315 AND created != "2018-03-09 19:03:40" OR state != "NY" UNION ALL SELECT AVG(created), MIN(vote_id), MIN(state), phone_number FROM VOTES WHERE "contestant_number" < 5 OR "phone_number" <= 5112677315 OR created = "2018-03-09 19:03:39" AND "vote_id" = 2 OR state = "NJ "


Question: SELECT i_id FROM item WHERE title = "avocado" UNION ALL SELECT i_id FROM review WHERE "i_id" = 3


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


Question: SELECT School_id FROM School WHERE Location != "Walkerton" EXCEPT SELECT School_id FROM budget WHERE "Year" <= 1999 OR Budget_invested_percent = "146.9" OR "Invested" < 8335 AND "Budgeted" > 6803


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


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


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


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


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


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


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


Question: SELECT 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 T1.distance, T2.eid FROM aircraft as T1 JOIN certificate as T2 ON T1.aid == T2.aid GROUP BY eid HAVING name <> "Boeing 757-300" AND distance <> 3383 OR eid = 356187925


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


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


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


Question: SELECT Type FROM store WHERE "Number_of_product_category" <> 793.0 OR Store_Name = "Neguac" OR "Area_size" <> 21.73 AND "Ranking" <> 3 OR "Store_ID" > 4 UNION SELECT Type FROM store WHERE "Ranking" <> 3


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


Question: SELECT 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