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 document_id, AVG(draft_number) FROM Document_Drafts WHERE "draft_number" <= 8 UNION ALL SELECT document_id, AVG(draft_number) FROM Draft_Copies WHERE "draft_number" <> 8


Question: SELECT property_type_description, property_type_code FROM Ref_Property_Types WHERE property_type_description <> "House, Bungalow, etc." INTERSECT SELECT property_type_description, property_type_code FROM Ref_Property_Types WHERE property_type_description <> "House, Bungalow, etc."


Question: SELECT COUNT(T1.feature_id), T2.property_id FROM Other_Available_Features as T1 JOIN Other_Property_Features as T2 ON T1.feature_id = T2.feature_id WHERE property_feature_description <> "odio" OR feature_name <> "Pool" OR feature_description = "Swimming Pool."


Question: SELECT property_id FROM Other_Property_Features WHERE "feature_id" != 2 UNION SELECT property_id FROM Properties WHERE apt_feature_3 <> "None" AND fld_feature_2 = "None" OR fld_feature_3 = "None" AND "room_count" >= 2 AND "vendor_requested_price" <> 661536468.4429 OR oth_feature_3 <> "None"


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 Company_ID FROM company WHERE Name <> "Total" OR Headquarters <> "Germany" OR Industry != "Oil and gas" AND "Sales_in_Billion" > 143.7 OR "Market_Value_in_Billion" <> 107.5 OR "Profits_in_Billion" <> 14.2 EXCEPT SELECT Company_ID FROM employment WHERE "People_ID" = 1


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


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


Question: SELECT Driver_ID FROM driver WHERE "Age" >= 52 OR Party != "Dem" AND "Driver_ID" != 6 AND Home_city <> "East Hartford" UNION ALL SELECT Driver_ID FROM school_bus WHERE "School_ID" = 7 OR If_full_time != "T"


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


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


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


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


Question: SELECT MAX(Profits_in_Billion), COUNT(Headquarters), SUM(Company_ID), COUNT(Industry), COUNT(Assets_in_Billion), AVG(Market_Value_in_Billion), COUNT(Name), Sales_in_Billion FROM company WHERE "Market_Value_in_Billion" > 294.7 OR Headquarters = "UK" OR "Sales_in_Billion" <> 82.6 OR Industry = "Conglomerate" AND "Company_ID" <> 7.0 GROUP BY Sales_in_Billion HAVING SUM(Company_ID) != 14.0 OR COUNT(Headquarters) > 1 OR COUNT(Name) < 1 AND MAX(Profits_in_Billion) >= 16.2 OR COUNT(Industry) <= 1 OR COUNT(Assets_in_Billion) < 1 UNION SELECT MAX(Profits_in_Billion), COUNT(Headquarters), SUM(Company_ID), COUNT(Industry), COUNT(Assets_in_Billion), AVG(Market_Value_in_Billion), COUNT(Name), Sales_in_Billion FROM company WHERE "Company_ID" >= 17.0 GROUP BY Sales_in_Billion HAVING AVG(Market_Value_in_Billion) < 132.4 AND COUNT(Industry) <= 1


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


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


Question: SELECT Member_ID, Register_Year, Branch_ID FROM membership_register_branch WHERE Branch_ID = "4" AND Register_Year = "2016" AND "Member_ID" != 2 UNION ALL SELECT Member_ID, Register_Year, Branch_ID FROM membership_register_branch WHERE Branch_ID = "6"


Question: SELECT pet_age, PetID, MIN(weight), PetType FROM Pets WHERE "PetID" <= 2003 OR "weight" < 9.3 OR PetType = "dog" EXCEPT SELECT pet_age, PetID, MIN(weight), PetType FROM Pets WHERE PetType != "dog"


Question: SELECT MAX(Store_ID) FROM store WHERE "Store_ID" <> 3 AND "Area_size" = 28.74 OR Type != "Village Store" OR "Ranking" >= 2 OR Store_Name <> "Rogersville" AND "Number_of_product_category" <> 17811.0 INTERSECT SELECT MAX(Store_ID) FROM store_product WHERE "Product_ID" <> 1 AND "Store_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 = 5


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 4 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 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 > 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 MIN(total_budget_percent_budgeted) FROM budget WHERE "total_budget_percent_budgeted" <> 2.0 AND "School_id" >= 4 INTERSECT SELECT MIN(total_budget_percent_budgeted) FROM budget WHERE "total_budget_percent_budgeted" <> 2.4 AND "Budgeted" <= 4979 AND "Invested" < 146102 AND "Year" <= 2001 AND "School_id" > 3 OR Budget_invested_percent != "71.3" OR "total_budget_percent_invested" <> 2.0


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 T1.age, T2.head_ID FROM head as T1 JOIN management as T2 ON T1.head_ID == T2.head_ID GROUP BY age HAVING age <> 69.0 AND name = "Dudley Hart" OR department_ID = 15 OR born_state <> "Connecticut" OR temporary_acting <> "Yes"


Question: SELECT ClubID, ClubLocation, ClubDesc, ClubName FROM Club WHERE ClubName != "Tennis Club" OR ClubDesc = "Venture capital fund for student business." OR "ClubID" >= 2 AND ClubLocation != "HHH" EXCEPT SELECT ClubID, ClubLocation, ClubDesc, ClubName FROM Club WHERE ClubName <> "Bootup Baltimore" OR ClubDesc <> "Refurbish computers; teach kids and adults about computer basics."

Refurbish computers; teach kids and adults about computer basics.


Question: SELECT state FROM AREA_CODE_STATE WHERE "area_code" = 339 EXCEPT SELECT state FROM VOTES WHERE "contestant_number" <> 3 AND state <> "NY" AND "vote_id" = 2 AND "phone_number" >= 6209222712 OR created <> "2018-03-09 19:03:39"


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


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


Question: SELECT Invested, COUNT(total_budget_percent_budgeted), SUM(Budget_invested_percent), SUM(total_budget_percent_invested) FROM budget WHERE "Budgeted" >= 3666 OR "total_budget_percent_budgeted" <> 2.4 AND "total_budget_percent_invested" <> 2.2 OR "Year" > 2004 UNION ALL SELECT Invested, COUNT(total_budget_percent_budgeted), SUM(Budget_invested_percent), SUM(total_budget_percent_invested) FROM budget WHERE "total_budget_percent_invested" != 2.0 OR "School_id" > 2 AND "Year" > 2006


Question: SELECT COUNT(donator_name) FROM endowment WHERE "amount" != 9.83 UNION ALL SELECT COUNT(donator_name) FROM endowment WHERE "amount" <> 9.83 OR donator_name != "Santiago" OR "endowment_id" >= 1


Question: SELECT customer_id, payment_method_code, datetime_payment, amount_payment FROM Customer_Payments WHERE payment_method_code = "Direct Debit" OR "amount_payment" != 8180.26 INTERSECT SELECT customer_id, payment_method_code, datetime_payment, amount_payment FROM Customer_Payments WHERE "amount_payment" > 4773.16 OR "customer_id" != 3 AND datetime_payment != "2018-03-12 13:31:36"


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


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


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


Question: SELECT Bonus FROM evaluation WHERE "Bonus" <= 3200.0 OR Year_awarded <> "2015" INTERSECT SELECT Bonus FROM evaluation WHERE Year_awarded != "2018" OR Employee_ID <> "7" OR "Bonus" >= 3200.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 = 4


Question: SELECT draft_number, document_id FROM Circulation_History WHERE "document_id" <> 1 OR "employee_id" != 1 AND "draft_number" = 17 OR "copy_number" > 10 EXCEPT SELECT draft_number, document_id FROM Draft_Copies WHERE "document_id" < 23 AND "copy_number" > 15 AND "draft_number" > 17


Question: SELECT city_code, Advisor, LName, Age, Major, Sex, StuID, Fname FROM Student WHERE Sex = "M" AND city_code != "WAS" INTERSECT SELECT city_code, Advisor, LName, Age, Major, Sex, StuID, Fname FROM Student WHERE Sex != "M" OR "Advisor" != 7134 OR LName != "Brown"

city_code Advisor LName Age Major Sex StuID Fname


Question: SELECT address_id, address_details FROM Addresses WHERE "address_id" > 2 AND address_details != "MX" UNION SELECT address_id, address_details FROM Addresses WHERE "address_id" = 7


Question: SELECT vehicle_details FROM Vehicles WHERE vehicle_details != "Truck" UNION SELECT vehicle_details FROM Vehicles WHERE vehicle_details != "Car" OR "vehicle_id" <> 3


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


Question: SELECT 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 T1.Id, T2.Year FROM car_makers as T1 JOIN cars_data as T2 ON T1.Id == T2.Id GROUP BY FullName HAVING Edispl > 156.0 AND Accelerate = 11.5


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


Question: SELECT Club_ID FROM club WHERE "Start_year" > 1998 AND Club_name <> "Djurgårdens IF" UNION SELECT Club_ID FROM match_result WHERE "Club_ID" > 2 OR "Big_Silver" <> 6 AND "Rank" > 4


Question: SELECT Template_ID FROM Documents WHERE Other_Details <> "None" OR Document_Description = "h" UNION SELECT Template_ID FROM Templates WHERE "Template_ID" > 0 OR Date_Effective_To <> "2008-01-05 14:19:28" OR "Version_Number" <> 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 MIN(document_id) FROM Circulation_History WHERE "copy_number" <> 4 OR "draft_number" < 20 AND "employee_id" >= 8 OR "document_id" >= 1 UNION SELECT MIN(document_id) FROM Documents_Mailed WHERE "mailed_to_address_id" = 3 AND "document_id" = 10 OR mailing_date = "1991-05-27 14:17:37"


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


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


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


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


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


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


Question: SELECT AVG(T1.Aircraft_ID), T2.Airport_ID FROM aircraft as T1 JOIN airport_aircraft as T2 ON T1.Aircraft_ID = T2.Aircraft_ID WHERE Max_disk_Loading = "15 lb/ft² (72 kg/m²)" AND Total_disk_area = "8,495 ft² (789 m²)" OR Description <> "Heavy-lift helicopter" AND Aircraft <> "Robinson R-22" OR Max_Gross_Weight = "1,370 lb (635 kg)"


Question: SELECT StuID, Major, Advisor FROM Student WHERE "Major" <= 600 OR Sex = "F" OR "Age" < 17 OR "Advisor" <= 9172 OR LName <> "Leighton" UNION ALL SELECT StuID, Major, Advisor FROM Student WHERE city_code != "LOS" AND "Age" <> 17 OR "Major" >= 600 OR Fname <> "Eric"


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


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


Question: SELECT u_id FROM useracct WHERE name = "Nancy" UNION SELECT u_id FROM useracct WHERE name <> "Helen"


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


Question: SELECT COUNT(Num_Employees), MAX(Ranking), AVG(Department_ID), Creation, COUNT(Name) FROM department WHERE Name <> "Treasury" OR "Ranking" != 13 GROUP BY Creation HAVING COUNT(Num_Employees) != 1 UNION SELECT COUNT(Num_Employees), MAX(Ranking), AVG(Department_ID), Creation, COUNT(Name) FROM department WHERE Creation <> "1903" OR "Department_ID" = 15 GROUP BY Creation HAVING AVG(Department_ID) = 8.0 AND MAX(Ranking) >= 8 AND COUNT(Name) >= 1 OR COUNT(Num_Employees) >= 1


Question: SELECT Club_ID, AVG(Rank) FROM coach WHERE Gender = "F" AND "Rank" <= 5 EXCEPT SELECT Club_ID, AVG(Rank) FROM match_result WHERE "Small_Silver" <> 4 OR "Club_ID" >= 3 OR "Gold" != 12 OR "Points" < 66 AND "Big_Silver" <= 6


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


Question: SELECT 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 ClubID FROM Club WHERE ClubLocation != "AKW" OR ClubDesc <> "Play pen and paper games on campus." AND ClubName = "Hopkins Student Enterprises" OR "ClubID" <> 3 UNION ALL SELECT ClubID FROM Member_of_club WHERE "ClubID" = 1 AND "StuID" >= 1010 AND Position = "CTO"


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


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


Question: SELECT feature_name FROM Other_Available_Features WHERE feature_type_code <> "Security" AND feature_name != "BurglarAlarm" EXCEPT SELECT feature_name FROM Other_Available_Features WHERE "feature_id" = 4 AND feature_type_code <> "Amenity"


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


Question: SELECT Committee, AVG(Party), COUNT(First_Elected), Delegate, Counties_Represented, Election_ID FROM election WHERE "First_Elected" <> 2002.0 OR Delegate = "Malone, James E. Jr. James E. Malone, Jr." OR "Party" <= 1 AND Committee <> "Appropriations" UNION ALL SELECT Committee, AVG(Party), COUNT(First_Elected), Delegate, Counties_Represented, Election_ID FROM election WHERE Delegate <> "Bobo, Elizabeth Elizabeth Bobo" AND "Election_ID" = 6 AND Committee <> "Economic Matters" AND "Party" < 1 OR "First_Elected" != 2003.0


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


Question: SELECT AVG(vehicle_id) FROM Lessons WHERE "customer_id" > 2 AND "vehicle_id" <> 2 EXCEPT SELECT AVG(vehicle_id) FROM Vehicles WHERE "vehicle_id" <= 2


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


Question: SELECT other_details FROM Employees WHERE employee_name = "Koby" OR role_code <> "PR" UNION ALL SELECT other_details FROM Employees WHERE employee_name <> "Clemens" AND other_details = "b" AND "employee_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 id FROM albums WHERE "id" <> 178 OR title != "Use Your Illusion II" UNION ALL SELECT id FROM employees WHERE country = "Canada" OR birth_date != "1958-12-08 00:00:00" AND last_name = "Adams" OR "reports_to" = 6.0 OR city = "Calgary" OR fax != "+1 (403) 467-8772" OR postal_code != "T3B 0C5" AND phone != "1 (780) 836-9987" OR state <> "AB" OR hire_date = "2003-10-17 00:00:00" AND email <> "nancy@chinookcorp.com"


Question: SELECT Branch_ID, Member_ID FROM membership_register_branch WHERE "Member_ID" > 5 EXCEPT SELECT Branch_ID, Member_ID FROM purchase WHERE Year <> "2017"


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 Document_ID, Document_Description FROM Documents WHERE Document_Name <> "Learning French" OR "Template_ID" >= 21 OR Other_Details != "None" OR "Document_ID" = 3830 UNION ALL SELECT Document_ID, Document_Description FROM Documents WHERE Document_Description = "w" OR Document_Name != "Summer Show" OR "Document_ID" < 3 OR "Template_ID" <= 6 OR Other_Details != "None"


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


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


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


Question: SELECT 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 People_ID FROM employment WHERE "Company_ID" > 17 OR "People_ID" <= 1 UNION SELECT People_ID FROM people WHERE "People_ID" >= 1 AND Nationality <> "United States" OR Graduation_College != "Northeastern" OR "Age" = 25


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


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


Question: SELECT document_id FROM Circulation_History WHERE "document_id" < 2 AND "employee_id" <> 1 UNION ALL SELECT document_id FROM Documents WHERE shipping_agent_code <> "AL" AND document_status_code != "overdue" OR receipt_date = "1985-11-05 17:59:34" OR other_details = "j" OR receipt_number <> "93" OR "document_id" <> 20


Question: SELECT School_ID FROM school WHERE Location != "Honolulu, Hawaii" AND Grade != "4th grade" AND "School_ID" >= 3 INTERSECT SELECT School_ID FROM school WHERE Type = "Private" AND "School_ID" < 6 OR Grade != "1st-3rd grade"


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


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


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


Question: SELECT copy_number, draft_number FROM Draft_Copies WHERE "copy_number" >= 5 OR "document_id" < 2 OR "draft_number" > 2 UNION ALL SELECT copy_number, draft_number FROM Draft_Copies WHERE "document_id" >= 10 OR "draft_number" <> 17 OR "copy_number" = 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 document_id FROM Documents WHERE other_details != "q" AND shipping_agent_code != "FE" OR receipt_number != "55" OR "document_id" != 25 AND receipt_date = "1999-04-17 14:19:32" AND document_type_code = "Paper" UNION SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" >= 7


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


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


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


Question: SELECT Template_Details, Date_Effective_From, Template_Type_Code, Version_Number, Template_ID, Date_Effective_To FROM Templates WHERE "Template_ID" = 6 AND Date_Effective_From <> "1983-07-16 21:16:16" UNION ALL SELECT Template_Details, Date_Effective_From, Template_Type_Code, Version_Number, Template_ID, Date_Effective_To FROM Templates WHERE Date_Effective_To != "1994-12-07 13:26:23" OR Date_Effective_From = "1999-06-21 11:10:30"


Question: SELECT COUNT(School_id) FROM School WHERE Mascot <> "Lancers" AND IHSAA_Class = "AA" OR School_name != "Knox Community" AND School_id <> "6" AND IHSAA_Football_Class = "AAA" AND County != "46 LaPorte 71 St. Joseph" OR Location != "Bremen" AND "Enrollment" <> 379 UNION SELECT COUNT(School_id) FROM budget WHERE Budget_invested_percent != "71.3" OR "School_id" < 2 OR "Year" < 2003 AND "total_budget_percent_invested" = 2.0


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


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


Question: SELECT hse_feature_2, shp_feature_3, buyer_offered_price, apt_feature_1, other_property_details, fld_feature_3, hse_feature_1, property_name, shp_feature_2, property_type_code, shp_feature_1, oth_feature_1, property_address, hse_feature_3, apt_feature_2, property_id, fld_feature_1, oth_feature_3, date_sold, room_count, apt_feature_3, fld_feature_2, date_on_market, agreed_selling_price FROM Properties WHERE shp_feature_3 != "None" OR other_property_details <> "None" AND hse_feature_3 = "None" AND date_sold != "1984-02-01 19:54:54" AND "vendor_requested_price" != 2573.0 AND hse_feature_2 = "None" AND shp_feature_1 <> "None" OR fld_feature_1 <> "None" AND apt_feature_2 = "aut" AND oth_feature_1 <> "None" AND date_on_market = "1978-05-15 10:53:37" OR apt_feature_1 = "enim" OR fld_feature_3 <> "None" OR property_address != "098 Tremaine Highway Suite 569 South Wilford, NJ 46587-3537" AND fld_feature_2 != "None" AND "property_id" = 9 AND hse_feature_1 <> "None" OR property_type_code <> "Other" OR oth_feature_2 <> "None" OR property_name = "the cole" AND oth_feature_3 <> "None" UNION ALL SELECT hse_feature_2, shp_feature_3, buyer_offered_price, apt_feature_1, other_property_details, fld_feature_3, hse_feature_1, property_name, shp_feature_2, property_type_code, shp_feature_1, oth_feature_1, property_address, hse_feature_3, apt_feature_2, property_id, fld_feature_1, oth_feature_3, date_sold, room_count, apt_feature_3, fld_feature_2, date_on_market, agreed_selling_price FROM Properties WHERE hse_feature_1 <> "None" OR apt_feature_1 != "enim" AND shp_feature_2 <> "None" OR "buyer_offered_price" > 11375259.502 OR property_type_code != "Other" OR fld_feature_3 <> "None" OR shp_feature_1 != "None" OR apt_feature_2 <> "suscipit" AND property_name <> "parc coliseum" AND "room_count" < 9 AND fld_feature_1 <> "None" OR hse_feature_3 = "None" AND other_property_details = "None" OR shp_feature_3 != "None" OR oth_feature_2 <> "None" OR oth_feature_1 <> "None" AND hse_feature_2 != "None" OR date_sold != "1987-12-07 07:41:27" AND "vendor_requested_price" = 13.4715 AND apt_feature_3 = "None" OR "agreed_selling_price" < 2574.0 OR date_on_market <> "1996-09-16 22:04:27" OR property_address != "60845 Else Highway Apt. 826 South Dougfort, CO 43200-4258" AND "property_id" > 14

4745 Emerson Stravenue Suite 829
South Garret, IN 16772-5682

098 Tremaine Highway Suite 569
South Wilford, NJ 46587-3537

49578 Ayden Mountains
New Russellhaven, UT 46626

2765 Schulist Stream
Lindmouth, UT 03391-3817

6837 Darien Views Apt. 475
South Maraview, KS 77770

092 Paucek Highway Apt. 772
East Erika, IA 61358

24365 Ulices Run
Homenicktown, MD 88485-6198

107 Roob Courts
Erdmanburgh, IA 42926-0873

084 Lakin Vista Apt. 394
Fishertown, MA 16876

743 Ephraim Greens
Anniemouth, HI 47084-3853

986 Hagenes Drives
Draketon, UT 83411-3393

4745 Emerson Stravenue Suite 829
South Garret, IN 16772-5682

098 Tremaine Highway Suite 569
South Wilford, NJ 46587-3537

062 Micaela Court Apt. 707
Margretville, WV 51628-3617

49578 Ayden Mountains
New Russellhaven, UT 46626

2765 Schulist Stream
Lindmouth, UT 03391-3817

6837 Darien Views Apt. 475
South Maraview, KS 77770

092 Paucek Highway Apt. 772
East Erika, IA 61358

24365 Ulices Run
Homenicktown, MD 88485-6198

107 Roob Courts
Erdmanburgh, IA 42926-0873

084 Lakin Vista Apt. 394
Fishertown, MA 16876

2088 Bashirian Fork Suite 337
Faustinoport, MT 16771-9320

743 Ephraim Greens
Anniemouth, HI 47084-3853

60845 Else Highway Apt. 826
South Dougfort, CO 43200-4258

1474 Dibbert Fields Suite 055
South Renee, IN 58286-3097

986 Hagenes Drives
Draketon, UT 83411-3393


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


Question: SELECT document_id FROM Documents WHERE document_status_code != "overdue" OR other_details = "x" OR "document_id" <> 24 AND document_type_code != "CD" AND shipping_agent_code = "US" INTERSECT SELECT document_id FROM Draft_Copies WHERE "draft_number" > 1 OR "document_id" < 12 AND "copy_number" >= 15


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


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


Question: SELECT Best_Finish, People_ID, Final_Table_Made, Earnings, Poker_Player_ID, Money_Rank FROM poker_player WHERE "Poker_Player_ID" >= 3 AND "Best_Finish" < 1.0 AND "Money_Rank" < 58.0 OR "People_ID" < 7 EXCEPT SELECT Best_Finish, People_ID, Final_Table_Made, Earnings, Poker_Player_ID, Money_Rank FROM poker_player WHERE "Best_Finish" <> 1.0 AND "Final_Table_Made" > 21.0 AND "Money_Rank" = 58.0 AND "People_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 AVG(u_id), rank FROM review WHERE "u_id" <= 2 EXCEPT SELECT AVG(u_id), rank FROM review WHERE "i_id" != 3


Question: SELECT Other_Details FROM Documents WHERE "Document_ID" <> 16514113 OR Document_Description <> "r" OR Document_Name != "Learning French" AND Other_Details != "None" UNION SELECT Other_Details FROM Paragraphs WHERE "Document_ID" != 651512 AND Other_Details = "None" OR Paragraph_Text <> "Brazil" AND "Paragraph_ID" < 7


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


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


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


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID > 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 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 = 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 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 > 11 UNION SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID <> 9


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


Question: SELECT copy_number, draft_number FROM Circulation_History WHERE "document_id" <> 20 OR "employee_id" <= 1 UNION SELECT copy_number, draft_number FROM Draft_Copies WHERE "copy_number" < 10 OR "document_id" != 10


Question: SELECT customer_id FROM Customer_Payments WHERE datetime_payment = "2018-02-01 06:15:31" OR payment_method_code != "Direct Debit" AND "amount_payment" < 6782.84 UNION SELECT customer_id FROM Customers WHERE cell_mobile_phone_number <> "861-638-9797" AND date_of_birth = "1998-12-15 13:24:40" OR date_became_customer = "2016-05-11 17:03:48" AND "amount_outstanding" >= 255.0 OR phone_number != "1-673-962-8158x7646" OR email_address != "hilario.sporer@example.org" OR last_name != "Mertz" AND "customer_address_id" < 10


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


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


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


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


Question: SELECT document_id, COUNT(shipping_agent_code), document_status_code, MIN(receipt_number), receipt_date, SUM(other_details), COUNT(document_type_code) FROM Documents WHERE "document_id" != 1 AND document_status_code = "done" AND receipt_number <> "93" OR other_details != "j" OR receipt_date <> "1986-12-14 14:18:59" AND shipping_agent_code = "FE" UNION ALL SELECT document_id, COUNT(shipping_agent_code), document_status_code, MIN(receipt_number), receipt_date, SUM(other_details), COUNT(document_type_code) FROM Documents WHERE "document_id" != 23


Question: SELECT SUM(T1.Sales_in_Billion), T2.Year_working FROM company as T1 JOIN employment as T2 ON T1.Company_ID = T2.Company_ID WHERE Headquarters <> "USA" AND Sales_in_Billion <= 447.0 OR People_ID > 7 AND Profits_in_Billion <> 25.7 AND COUNT(Year_working) > 1 AND COUNT(Market_Value_in_Billion) > 237.4 OR Name = "ExxonMobil" AND Assets_in_Billion <= 1873.9


Question: SELECT Driver_ID FROM driver GROUP BY Driver_ID HAVING Driver_ID <= 11 EXCEPT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID < 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 COUNT(document_id) FROM Circulation_History WHERE "employee_id" > 2 AND "draft_number" >= 17 UNION ALL SELECT COUNT(document_id) FROM Documents WHERE shipping_agent_code != "US" OR receipt_number != "69" AND document_status_code != "working" AND other_details <> "p" AND receipt_date != "1974-05-08 00:00:46" OR document_type_code <> "Hard Drive"


Question: SELECT Coach_ID FROM coach WHERE Coach_name = "Jameson Tomas" OR Gender != "M" AND "Coach_ID" < 5 OR "Rank" < 5 INTERSECT SELECT Coach_ID FROM player_coach WHERE "Starting_year" <= 2011 OR "Coach_ID" > 1


Question: SELECT SUM(Party), COUNT(District), AVG(First_Elected), Committee, Delegate FROM election WHERE "District" != 2 OR "First_Elected" < 1994.0 AND Committee <> "Health and Government Operations" OR Counties_Represented <> "09.1 9A" OR "Election_ID" <= 7 AND "Party" <= 4 EXCEPT SELECT SUM(Party), COUNT(District), AVG(First_Elected), Committee, Delegate FROM election WHERE Counties_Represented = "13" OR Committee = "Health and Government Operations" AND "Election_ID" != 4 OR Delegate = "Pendergrass, Shane E. Shane Pendergrass"

SUM(Party) COUNT(District) AVG(First_Elected) Committee Delegate


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


Question: SELECT Store_ID FROM store WHERE "Area_size" != 26.69 EXCEPT SELECT Store_ID FROM store_product WHERE "Product_ID" = 4 AND "Store_ID" <= 5


Question: SELECT COUNT(Best_Finish), People_ID, Earnings, Poker_Player_ID, Money_Rank FROM poker_player WHERE "Best_Finish" = 2.0 AND "Earnings" != 104871.0 OR "Poker_Player_ID" != 5 EXCEPT SELECT COUNT(Best_Finish), People_ID, Earnings, Poker_Player_ID, Money_Rank FROM poker_player WHERE "Poker_Player_ID" >= 2 OR "Money_Rank" > 166.0


Question: SELECT SUM(Store_ID), MIN(Product_ID) FROM store_product WHERE "Product_ID" != 2 AND "Store_ID" <> 2 EXCEPT SELECT SUM(Store_ID), MIN(Product_ID) FROM store_product WHERE "Store_ID" <= 3


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


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


Question: SELECT document_type_code FROM Documents WHERE other_details != "u" OR receipt_number <> "83" AND "document_id" >= 25 AND receipt_date != "1996-05-31 06:51:58" OR document_status_code != "overdue" UNION SELECT document_type_code FROM Ref_Document_Types WHERE document_type_code != "Hard Drive"


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 salary, eid FROM employee WHERE "salary" != 44740 INTERSECT SELECT salary, eid FROM employee WHERE "eid" = 552455348 AND "salary" <= 289950


Question: SELECT StuID FROM Member_of_club WHERE "ClubID" = 1 AND Position = "Vice-President" OR "StuID" <> 1007 UNION ALL SELECT StuID FROM Student WHERE "Major" <= 600 AND "StuID" <= 1006 OR Fname = "Susan" AND city_code = "BAL" AND "Age" != 18


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


Question: SELECT MIN(shp_feature_2), AVG(buyer_offered_price), AVG(hse_feature_2), hse_feature_1, COUNT(agreed_selling_price), room_count, apt_feature_3, shp_feature_1, property_address, property_type_code, COUNT(hse_feature_3), oth_feature_2, fld_feature_2, COUNT(property_name), AVG(oth_feature_3), SUM(apt_feature_1), SUM(fld_feature_3), SUM(date_sold), SUM(vendor_requested_price), COUNT(oth_feature_1), SUM(apt_feature_2), other_property_details, COUNT(fld_feature_1), SUM(date_on_market), shp_feature_3, property_id FROM Properties WHERE hse_feature_3 <> "None" OR property_type_code != "Other" AND "buyer_offered_price" < 10.1067 AND "room_count" > 2 AND "vendor_requested_price" = 2219.6778 OR apt_feature_3 <> "None" UNION ALL SELECT MIN(shp_feature_2), AVG(buyer_offered_price), AVG(hse_feature_2), hse_feature_1, COUNT(agreed_selling_price), room_count, apt_feature_3, shp_feature_1, property_address, property_type_code, COUNT(hse_feature_3), oth_feature_2, fld_feature_2, COUNT(property_name), AVG(oth_feature_3), SUM(apt_feature_1), SUM(fld_feature_3), SUM(date_sold), SUM(vendor_requested_price), COUNT(oth_feature_1), SUM(apt_feature_2), other_property_details, COUNT(fld_feature_1), SUM(date_on_market), shp_feature_3, property_id FROM Properties WHERE property_name != "high line" AND apt_feature_3 = "None"


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


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


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


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


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


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


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


Question: SELECT trust FROM trust WHERE "target_u_id" = 5 OR "trust" <> 2 UNION SELECT trust FROM trust WHERE "target_u_id" >= 2


Question: SELECT line_1_number_building, SUM(country), zip_postcode, address_id, MAX(state_province_county) FROM Addresses WHERE country = "USA" OR city <> "Buckridgehaven" AND line_1_number_building != "37698 Hahn Curve Apt. 572" OR zip_postcode = "80376" AND state_province_county != "Washington" OR "address_id" <> 5 UNION ALL SELECT line_1_number_building, SUM(country), zip_postcode, address_id, MAX(state_province_county) FROM Addresses WHERE "address_id" != 5 OR city != "Ericamouth" AND country <> "USA"


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 MAX(name) FROM aircraft WHERE "aid" != 5 UNION ALL SELECT MAX(name) FROM employee WHERE name != "Linda Davis"


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


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


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


Question: SELECT property_id FROM Other_Property_Features WHERE "property_id" != 13 OR property_feature_description != "autem" UNION ALL SELECT property_id FROM Properties WHERE other_property_details = "None" OR fld_feature_3 != "None" AND "vendor_requested_price" = 13.4715 AND shp_feature_1 = "None" OR date_sold = "1997-01-07 19:52:45" OR hse_feature_2 != "None" AND property_type_code = "Apartment" AND "room_count" >= 8 OR hse_feature_3 = "None" AND apt_feature_2 != "sit" AND oth_feature_2 <> "None" OR fld_feature_2 <> "None" AND fld_feature_1 <> "None" OR oth_feature_3 != "None" AND hse_feature_1 != "None" AND "property_id" < 7 AND "buyer_offered_price" <> 2449185.2 AND oth_feature_1 != "None" AND apt_feature_1 <> "et" OR "agreed_selling_price" <> 3344706.5755 OR property_name = "longacre" AND apt_feature_3 <> "None" AND date_on_market <> "2003-12-25 16:13:19"


Question: SELECT Employee_ID, Year_awarded FROM evaluation WHERE Employee_ID = "10" UNION SELECT Employee_ID, Year_awarded FROM evaluation WHERE Year_awarded = "2017"


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


Question: SELECT ClubID, StuID FROM Member_of_club WHERE Position != "Vice-President" OR "StuID" <> 1001 AND "ClubID" <> 2 INTERSECT SELECT ClubID, StuID FROM Member_of_club WHERE Position != "Teaching Coordinator"


Question: SELECT AVG(StuID), ClubID, Position FROM Member_of_club WHERE "StuID" > 1010 OR Position <> "CTO" OR "ClubID" < 4 UNION ALL SELECT AVG(StuID), ClubID, Position FROM Member_of_club WHERE Position != "Vice-President"


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


Question: SELECT MAX(Template_Type_Description), Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Code = "AD" OR Template_Type_Description = "CV" UNION SELECT MAX(Template_Type_Description), Template_Type_Code FROM Ref_Template_Types WHERE Template_Type_Code <> "CV"


Question: SELECT MIN(Model) FROM car_names WHERE "MakeId" < 195 AND Model != "volkswagen" INTERSECT SELECT MIN(Model) FROM model_list WHERE Model <> "capri" AND "Maker" <= 11 OR "ModelId" < 19


Question: SELECT MAX(feature_id), feature_type_code FROM Other_Available_Features WHERE feature_type_code = "Security" AND "feature_id" != 4 OR feature_description != "Burglar Alarm" AND feature_name <> "BurglarAlarm" GROUP BY feature_type_code HAVING MAX(feature_id) >= 3 UNION SELECT MAX(feature_id), feature_type_code FROM Other_Available_Features WHERE feature_description != "Burglar Alarm" OR feature_name != "AirCon" AND "feature_id" = 3 GROUP BY feature_type_code HAVING MAX(feature_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 <= 3


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


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


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


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


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


Question: SELECT City, Branch_ID, Name, Open_year FROM branch WHERE membership_amount = "6" OR City != "London" OR Address_road = "Valleys Place" OR "Branch_ID" > 3 AND Open_year <> "2012" UNION ALL SELECT City, Branch_ID, Name, Open_year FROM branch WHERE membership_amount != "11" OR City <> "Oxford" AND Address_road <> "Glebe Street"


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 born_state FROM head WHERE born_state = "California" AND "age" <> 56.0 OR "head_ID" <= 7 OR name = "Tiger Woods" UNION ALL SELECT born_state FROM head WHERE "head_ID" > 4 AND name != "Tiger Woods" AND born_state != "Connecticut"


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


Question: SELECT CountryName, Continent FROM countries WHERE "Continent" != 2 UNION ALL SELECT CountryName, Continent FROM countries WHERE CountryName = "new zealand" OR "CountryId" > 8


Question: SELECT name FROM aircraft WHERE name != "Airbus A340-300" UNION SELECT name FROM employee WHERE name <> "Jennifer Thomas"


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


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


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


Question: SELECT Branch_ID, Member_ID FROM membership_register_branch WHERE "Member_ID" <= 5 INTERSECT SELECT Branch_ID, Member_ID FROM membership_register_branch WHERE "Member_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 < 7


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


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


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


Question: SELECT aid, distance FROM aircraft WHERE "aid" <= 10 AND name <> "Boeing 777-300" AND "distance" != 520 UNION SELECT aid, distance FROM flight WHERE "price" != 278.56 AND origin = "Los Angeles" OR destination = "Boston" AND arrival_date = "04/12/2005 11:10" AND "flno" > 387 OR departure_date <> "04/12/2005 09:15" OR "aid" >= 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 < 5


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


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


Question: SELECT Type, Grade FROM school WHERE Location = "Jakarta, Indonesia" OR Type <> "Private" UNION SELECT Type, Grade FROM school WHERE Location <> "Los Angeles, California" OR School <> "St. Francis Assisi" AND Grade <> "1st-3rd grade" AND "School_ID" > 6


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 staff_id FROM Lessons WHERE "staff_id" != 8 OR lesson_date = "2018-03-07 11:53:32" INTERSECT SELECT staff_id FROM Staff WHERE last_name != "Sawayn" AND date_joined_staff != "2017-02-20 18:45:20" OR "staff_id" = 2 AND "staff_address_id" <> 4 AND nickname = "edwin.hudson" AND date_of_birth != "1998-04-27 12:55:05"


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 Book_ID FROM book WHERE "Book_ID" > 7 UNION ALL SELECT Book_ID FROM publication WHERE "Price" != 15000000.0 OR "Publication_ID" = 6 OR Publication_Date = "April 2007" OR Publisher <> "Springer Nature" OR "Book_ID" = 3


Question: SELECT AVG(document_type_description), document_type_code FROM Ref_Document_Types WHERE document_type_description != "b" OR document_type_code != "Paper" UNION SELECT AVG(document_type_description), document_type_code FROM Ref_Document_Types WHERE document_type_code <> "CD"


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


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


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


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


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


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 1 EXCEPT SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID >= 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 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 < 12 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 != 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 >= 8 INTERSECT SELECT Driver_ID FROM school_bus GROUP BY Driver_ID HAVING Driver_ID = 9


Question: SELECT SUM(T1.Driver_ID), T2.School_ID FROM driver as T1 JOIN school_bus as T2 ON T1.Driver_ID = T2.Driver_ID WHERE Home_city = "Hartford" OR Name = "Edwin Vargas" OR "School_ID" < 5 AND If_full_time <> "T" OR "Age" < 42 OR "Years_Working" <> 6 GROUP BY School_ID HAVING Party <> "Dem" OR Years_Working = 8 OR If_full_time = "T"


Question: SELECT SUM(Member_ID), COUNT(Register_Year) FROM membership_register_branch WHERE Branch_ID <> "8" EXCEPT SELECT SUM(Member_ID), COUNT(Register_Year) FROM membership_register_branch WHERE Branch_ID <> "5" AND Register_Year != "2016" AND "Member_ID" >= 5


Question: SELECT Club_ID FROM club WHERE "Start_year" > 2005 OR "Club_ID" <> 2 OR Region != "Russia" UNION SELECT Club_ID FROM coach WHERE Coach_name <> "Robert Chen"


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


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


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


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


Question: SELECT document_id FROM Circulation_History WHERE "draft_number" != 2 INTERSECT SELECT document_id FROM Circulation_History WHERE "document_id" <= 10


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


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


Question: SELECT contestant_name, SUM(contestant_number) FROM CONTESTANTS WHERE contestant_name = "Tabatha Gehling" EXCEPT SELECT contestant_name, SUM(contestant_number) FROM CONTESTANTS WHERE "contestant_number" <> 5 AND contestant_name != "Kelly Clauss"


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


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


Question: SELECT Branch_ID FROM branch WHERE Name <> "Zytogorski" AND Address_road = "Oaks Crescent" AND Open_year != "2009" AND City = "London" OR "Branch_ID" <= 8 UNION SELECT Branch_ID FROM membership_register_branch WHERE Branch_ID != "1" AND Register_Year <> "2016"


Question: SELECT MAX(Maker) FROM car_makers WHERE FullName <> "Saab" UNION ALL SELECT MAX(Maker) FROM model_list WHERE Model <> "datsun" AND "Maker" != 4 AND "ModelId" > 35


Question: SELECT Employee_ID, Bonus, Year_awarded FROM evaluation WHERE "Bonus" > 3200.0 UNION SELECT Employee_ID, Bonus, Year_awarded FROM evaluation WHERE Year_awarded <> "2017"


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


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


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


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


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


Question: SELECT AVG(customer_id) FROM Customer_Payments WHERE payment_method_code != "Direct Debit" AND datetime_payment != "2018-03-12 08:41:47" OR "customer_id" = 6 EXCEPT SELECT AVG(customer_id) FROM Lessons WHERE lesson_date = "2018-03-08 16:05:05" OR "vehicle_id" <= 2 AND "customer_id" > 2


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


Question: SELECT date_of_birth, first_name FROM Customers WHERE "amount_outstanding" <> 1000.0 OR last_name <> "Mertz" AND first_name = "Dianna" AND "customer_id" <> 13 EXCEPT SELECT date_of_birth, first_name FROM Staff WHERE "staff_id" = 15


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 SUM(vehicle_id) FROM Lessons WHERE lesson_date = "2018-03-07 11:53:32" AND "lesson_id" > 12 AND "price" != 446.0 AND "staff_id" != 12 AND "vehicle_id" <= 1 AND lesson_time != "6" UNION ALL SELECT SUM(vehicle_id) FROM Vehicles WHERE vehicle_details != "Truck"


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


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


Question: SELECT Name FROM branch WHERE "Branch_ID" < 4 OR Address_road = "Abbott Street" OR membership_amount != "91" AND City != "Oxford" UNION SELECT Name FROM member WHERE "Member_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 != 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 Ranking, Num_Employees, Department_ID FROM department WHERE "Ranking" = 7 OR "Budget_in_Billions" = 9.96 OR "Num_Employees" <= 58622.0 OR "Department_ID" <= 11 OR Name != "Health and Human Services" UNION SELECT Ranking, Num_Employees, Department_ID FROM department WHERE "Ranking" != 3 AND "Department_ID" <= 10 OR "Num_Employees" > 235000.0


Question: SELECT T1.International_Passengers, T2.Aircraft_ID FROM airport as T1 JOIN airport_aircraft as T2 ON T1.Airport_ID = T2.Airport_ID


Question: SELECT id FROM albums WHERE "artist_id" <= 90 INTERSECT SELECT id FROM media_types WHERE "id" = 3 OR name <> "MPEG audio file"


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


Question: SELECT draft_number, document_id FROM Circulation_History WHERE "draft_number" != 2 AND "copy_number" > 4 UNION ALL SELECT draft_number, document_id FROM Document_Drafts WHERE "document_id" <= 13 OR "draft_number" >= 16


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


Question: SELECT COUNT(last_name), staff_id, SUM(date_left_staff), first_name, MAX(middle_name), AVG(date_joined_staff) FROM Staff WHERE middle_name = "Tre" AND "staff_id" = 14 OR "staff_address_id" <= 6 OR last_name != "Maggio" OR date_of_birth != "1995-06-03 08:09:17" AND first_name = "Jaleel" UNION ALL SELECT COUNT(last_name), staff_id, SUM(date_left_staff), first_name, MAX(middle_name), AVG(date_joined_staff) FROM Staff WHERE middle_name = "Mayra" OR last_name != "Maggio" AND date_left_staff <> "2018-03-14 07:14:37" OR date_of_birth != "2005-05-02 06:23:36" AND nickname <> "weissnat.vincenzo" AND date_joined_staff <> "2017-06-04 14:30:41" AND "staff_id" > 4


Question: SELECT Home_city, Age, Driver_ID, Party, Name FROM driver WHERE Home_city = "Manchester" AND "Driver_ID" != 9 OR "Age" >= 35 OR Name != "Angel Acre" UNION ALL SELECT Home_city, Age, Driver_ID, Party, Name FROM driver WHERE Home_city != "Hartford" OR "Driver_ID" < 11 AND "Age" < 46


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


Question: SELECT name FROM airport WHERE ICAO != "PANC" OR name = "Schiphol Airport" OR IATA = "AEY" OR City <> "Brussels" OR Country != "Iceland" UNION SELECT name FROM operate_company WHERE Incorporated_in != "Hong Kong" OR Principal_activities = "Cargo airline" OR "Group_Equity_Shareholding" != 60.0

Cathay Pacific Catering Services (HK) Limited


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


Question: SELECT aid FROM aircraft WHERE "aid" = 8 AND "distance" != 8430 INTERSECT SELECT aid FROM certificate WHERE "aid" <> 9 AND "eid" >= 159542516


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


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


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


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


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


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


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


Question: SELECT AVG(T1.Employee_ID), T2.Employee_ID FROM employee as T1 JOIN evaluation as T2 ON T1.Employee_ID = T2.Employee_ID WHERE "Bonus" <> 3000.0 GROUP BY Bonus HAVING Year_awarded <> "2011" OR Name = "Matt Stevens" AND Age > 23


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


Question: SELECT Employee_ID FROM evaluation WHERE "Bonus" < 3200.0 AND Employee_ID != "7" OR Year_awarded != "2015" UNION SELECT Employee_ID FROM hiring WHERE Start_from != "2009" AND "Shop_ID" <= 2


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


Question: SELECT T1.Domestic_Passengers, T2.Aircraft_ID FROM airport as T1 JOIN airport_aircraft as T2 ON T1.Airport_ID = T2.Airport_ID


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


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


Question: SELECT Aircraft_ID FROM aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID < 5 UNION SELECT Aircraft_ID FROM airport_aircraft GROUP BY Aircraft_ID HAVING Aircraft_ID = 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 != 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 Template_ID FROM Documents WHERE "Template_ID" <> 21 UNION SELECT Template_ID FROM Templates WHERE "Template_ID" != 10 AND Date_Effective_From != "1993-10-07 02:33:04" OR Date_Effective_To <> "1973-01-12 14:13:34" AND Template_Type_Code <> "AD"


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 customer_id FROM Customers WHERE date_of_birth != "1998-12-15 13:24:40" OR first_name <> "Millie" AND date_became_customer != "2016-03-18 06:14:18" OR "customer_id" <> 11 EXCEPT SELECT customer_id FROM Lessons WHERE "lesson_id" >= 15 OR lesson_date = "2018-03-21 06:48:45" AND "staff_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 receipt_number, document_status_code FROM Documents WHERE "document_id" >= 7 AND receipt_date != "2008-04-21 20:42:25" OR shipping_agent_code <> "UP" AND document_type_code != "Hard Drive" AND receipt_number <> "69" OR document_status_code <> "done" EXCEPT SELECT receipt_number, document_status_code FROM Documents WHERE receipt_date = "1986-12-14 14:18:59"


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


Question: SELECT 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 MAX(Earnings), SUM(Best_Finish) FROM poker_player WHERE "Poker_Player_ID" != 2 OR "People_ID" != 7 UNION ALL SELECT MAX(Earnings), SUM(Best_Finish) FROM poker_player WHERE "Money_Rank" != 58.0 AND "Final_Table_Made" = 21.0 OR "Earnings" != 189233.0 AND "Best_Finish" <> 1.0


Question: SELECT SUM(StuID) FROM Member_of_club WHERE Position = "Teaching Coordinator" AND "ClubID" != 2 AND "StuID" != 1001 UNION SELECT SUM(StuID) FROM Student WHERE Fname <> "Eric" OR "StuID" <= 1003 OR "Major" <> 600


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


Question: SELECT id FROM albums WHERE "artist_id" <> 200 OR "id" != 62 UNION ALL SELECT id FROM genres WHERE "id" < 16


Question: SELECT Region FROM club WHERE Club_name <> "Halmstads BK" OR Region <> "Russia" UNION ALL SELECT Region FROM club WHERE "Club_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 != 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 name, id FROM airport WHERE "id" >= 6 AND Country != "United States" EXCEPT SELECT name, id FROM operate_company WHERE "Group_Equity_Shareholding" = 60.0 AND Principal_activities <> "Catering services" OR name != "CLS Catering Services Limited" AND Incorporated_in <> "Hong Kong" OR Type = "Joint Venture"


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


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


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


Question: SELECT 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 Employee_ID FROM employee WHERE City <> "Sale" OR "Age" != 28 OR Name = "Louis Deacon" OR "Employee_ID" >= 9 UNION ALL SELECT Employee_ID FROM evaluation WHERE "Bonus" > 3200.0


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 MIN(document_id), draft_number FROM Draft_Copies WHERE "draft_number" = 20 OR "copy_number" <= 6 OR "document_id" >= 2 UNION ALL SELECT MIN(document_id), draft_number FROM Draft_Copies WHERE "copy_number" != 5 AND "draft_number" >= 17 AND "document_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 = 2


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


Question: SELECT u_id FROM review WHERE "rating" < 7 AND "i_id" <> 3 OR "rank" != 1 OR "u_id" = 2 EXCEPT SELECT u_id FROM useracct WHERE name <> "Helen" OR "u_id" > 4


Question: SELECT ClubID FROM Club WHERE ClubLocation = "AKW" OR ClubDesc != "Venture capital fund for student business." AND ClubName != "Tennis Club" INTERSECT SELECT ClubID FROM Member_of_club WHERE "StuID" <> 1010 OR "ClubID" >= 4


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


Question: SELECT ICAO, name, id, Country, City FROM airport WHERE Country != "Netherlands" AND "id" <> 1 AND IATA <> "BWI" UNION ALL SELECT ICAO, name, id, Country, City FROM airport WHERE ICAO <> "EHAM" AND "id" < 9 AND IATA = "BWI" OR City <> "Barcelona" OR Country <> "United States" AND name <> "Ted Stevens Airport"

PANC
Ted Stevens Airport
3
United States
Anchorage

KBOS
Logan International Airport
8
United States
Boston

EBBR
National Airport
9
Belgium
Brussels

BIAR
Akureyri Airport
1
Iceland
Akureyri

EHAM
Schiphol Airport
2
Netherlands
Amsterdam

PANC
Ted Stevens Airport
3
United States
Anchorage

KBWI
Baltimore-Washington Airport
4
United States
Baltimore

KBOS
Logan International Airport
8
United States
Boston

EBBR
National Airport
9
Belgium
Brussels


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 AVG(City_Population) <> 530438.0 OR COUNT(Store_ID) <= 1 AND City_Area <> 22.0 AND District_name <> "Chiniot District"


Question: SELECT Manager_name, Shop_ID, Number_products FROM shop WHERE Name = "IFK Mariehamn" OR Manager_name = "Antti Muurinen" OR District <> "Veritas Stadion" AND "Shop_ID" < 6 AND Location != "Turku" AND "Number_products" != 3516 INTERSECT SELECT Manager_name, Shop_ID, Number_products FROM shop WHERE Name <> "FC Inter" OR Manager_name <> "Job Dragtsma" AND Location != "Kotka" AND District != "Magnum Areena" AND "Number_products" = 10770 AND "Shop_ID" <> 8


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


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


Question: SELECT Company_ID FROM employment WHERE "People_ID" != 4 UNION SELECT Company_ID FROM employment WHERE "Year_working" = 4


Question: SELECT SUM(T1.StuID), T2.pet_age FROM Has_Pet as T1 JOIN Pets as T2 ON T1.PetID = T2.PetID WHERE PetType <> "dog"


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


Question: SELECT id FROM albums WHERE "artist_id" = 17 OR "id" > 15 AND title = "Transmission" UNION SELECT id FROM employees WHERE postal_code != "T5K 2N1"


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 Document_Description, Other_Details, Template_ID FROM Documents WHERE "Template_ID" = 22 OR Document_Name <> "Understanding DB" INTERSECT SELECT Document_Description, Other_Details, Template_ID FROM Documents WHERE "Template_ID" > 11 OR "Document_ID" <= 1 OR Document_Name != "Learning French"


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


Question: SELECT document_id FROM Circulation_History WHERE "copy_number" <= 10 OR "employee_id" != 2 UNION SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" <> 8


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 AVG(District_ID), COUNT(District_name), MAX(City_Population), Headquartered_City, MAX(City_Area) FROM district GROUP BY Headquartered_City HAVING COUNT(District_name) <> 1 AND MAX(City_Population) <= 2793721.0 AND AVG(District_ID) <= 12.0 UNION SELECT AVG(District_ID), COUNT(District_name), MAX(City_Population), Headquartered_City, MAX(City_Area) FROM district GROUP BY Headquartered_City HAVING MAX(City_Population) > 530438.0 AND COUNT(District_name) != 1 OR MAX(City_Area) = 28.0 AND AVG(District_ID) < 15.0


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


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


Question: SELECT decor, maxOccupancy, roomName, bedType, basePrice, RoomId, beds FROM Rooms WHERE "basePrice" > 150 AND "maxOccupancy" <> 2 AND bedType <> "King" AND roomName <> "Interim but salutary" OR "beds" <= 2 UNION ALL SELECT decor, maxOccupancy, roomName, bedType, basePrice, RoomId, beds FROM Rooms WHERE RoomId = "AOB" OR "basePrice" < 175 OR "beds" < 2 OR decor = "modern"

decor maxOccupancy roomName bedType basePrice RoomId beds


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


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


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


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


Question: SELECT amount_payment, customer_id FROM Customer_Payments WHERE payment_method_code <> "Credit Card" AND "amount_payment" <= 6970.98 AND "customer_id" > 2 OR datetime_payment <> "2018-03-12 08:41:47" UNION SELECT amount_payment, customer_id FROM Customer_Payments WHERE "customer_id" < 2


Question: SELECT Club_ID FROM club WHERE "Start_year" < 1998 OR Region <> "USA" EXCEPT SELECT Club_ID FROM coach WHERE Coach_name <> "Jameson Tomas" OR "Coach_ID" > 2 OR "Rank" < 5 OR "Club_ID" >= 1 OR Gender = "M"


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


Question: SELECT Ranking, Number_of_product_category, Store_ID, Area_size FROM store WHERE "Number_of_product_category" >= 1678.0 OR "Area_size" > 28.74 AND "Store_ID" <> 2 UNION ALL SELECT Ranking, Number_of_product_category, Store_ID, Area_size FROM store WHERE "Area_size" > 26.69


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


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


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


Question: SELECT document_id FROM Document_Drafts WHERE draft_details <> "p" UNION SELECT document_id FROM Documents_Mailed WHERE "mailed_to_address_id" != 5


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


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


Question: SELECT AVG(interface), max_page_size, AVG(product) FROM product WHERE "dpi" > 600.0 OR dimensions <> "300 x 50 x 45" OR interface <> "USB 2.0" AND "product_id" = 3 AND product <> "Fujitsu fi-6130 A4 Series Scanner" EXCEPT SELECT AVG(interface), max_page_size, AVG(product) FROM product WHERE interface = "USB 2.0" AND max_page_size <> "A4" AND dimensions != "298 x 209 x 99"


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 Store_ID FROM store WHERE Store_Name <> "Rogersville" AND "Ranking" <> 3 OR "Store_ID" = 2 AND "Area_size" <= 179.84 OR Type != "Village Store" OR "Number_of_product_category" > 1170.0 UNION SELECT Store_ID FROM store_product WHERE "Product_ID" < 6


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


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


Question: SELECT AVG(other_details) FROM Documents WHERE "document_id" <> 1 UNION ALL SELECT AVG(other_details) FROM Employees WHERE role_code != "PT" OR other_details <> "v" AND "employee_id" < 2


Question: SELECT Member_ID, Total_pounds, Year FROM purchase WHERE "Member_ID" != 1 AND "Total_pounds" != 2013.32 AND Year = "2018" EXCEPT SELECT Member_ID, Total_pounds, Year FROM purchase WHERE "Total_pounds" <> 321.13 AND Branch_ID <> "6"


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


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


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


Question: SELECT i_id FROM item WHERE title != "shampoo" UNION ALL SELECT i_id FROM review WHERE "rank" <> 5 AND "i_id" <= 7 OR "u_id" < 1 OR "a_id" != 3 OR "rating" >= 10


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


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


Question: SELECT feature_type_code FROM Other_Available_Features WHERE feature_name = "BurglarAlarm" AND feature_description <> "Air Conditioning." INTERSECT SELECT feature_type_code FROM Ref_Feature_Types WHERE feature_type_name <> "Amenity, eg Pool."


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


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


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


Question: SELECT AVG(document_id) FROM Circulation_History WHERE "draft_number" > 20 EXCEPT SELECT AVG(document_id) FROM Draft_Copies WHERE "document_id" <> 12 OR "draft_number" != 20 OR "copy_number" < 15


Question: SELECT name, SUM(u_id) FROM useracct WHERE name != "Nancy" OR "u_id" = 5 UNION SELECT name, SUM(u_id) FROM useracct WHERE "u_id" = 1


Question: SELECT maxOccupancy, beds, roomName, decor FROM Rooms WHERE RoomId != "IBS" AND "basePrice" <> 100 OR decor = "modern" AND bedType <> "Double" AND roomName <> "Thrift and accolade" AND "maxOccupancy" <= 2 AND "beds" = 1 EXCEPT SELECT maxOccupancy, beds, roomName, decor FROM Rooms WHERE "beds" > 2 AND bedType <> "King" AND RoomId <> "IBD" OR roomName != "Mendicant with cryptic" AND "maxOccupancy" = 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 <= 4


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


Question: SELECT AVG(other_details) FROM Documents WHERE document_type_code != "Paper" OR "document_id" <= 17 UNION ALL SELECT AVG(other_details) FROM Employees WHERE role_code = "PT" OR other_details = "u" OR "employee_id" != 7 AND employee_name != "Haley"


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


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


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


Question: SELECT Name FROM employee WHERE Name != "Steve Borthwick" AND "Employee_ID" > 5 OR "Age" < 23 OR City = "Leicester" UNION SELECT Name FROM shop WHERE Manager_name <> "Mika Laurikainen" OR District != "Tapiolan Urheilupuisto" AND "Shop_ID" <= 1 OR Location <> "Lahti" OR Name != "FC Honka" AND "Number_products" <= 10770


Question: SELECT employee_id FROM Circulation_History WHERE "document_id" < 1 OR "draft_number" < 1 AND "copy_number" < 10 UNION SELECT employee_id FROM Employees WHERE role_code <> "PT"


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


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


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


Question: SELECT feature_type_name FROM Ref_Feature_Types WHERE feature_type_code <> "Amenity" OR feature_type_name = "Amenity, eg Pool." UNION ALL SELECT feature_type_name FROM Ref_Feature_Types WHERE feature_type_code != "Security"


Question: SELECT MIN(Location), Shop_ID, District, Manager_name, Number_products FROM shop WHERE Name <> "FC Inter" AND "Number_products" >= 3516 OR Location = "Jakobstad" OR Manager_name <> "Mika Laurikainen" UNION SELECT MIN(Location), Shop_ID, District, Manager_name, Number_products FROM shop WHERE Manager_name = "Kai Nyyssönen" OR "Shop_ID" <> 1 AND District <> "Jakobstads Centralplan" AND Location != "Turku" OR "Number_products" >= 6000 AND Name != "IFK Mariehamn"