input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Description FROM aircraft;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT avg(International_Passengers) FROM airport;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT avg(International_Passengers) FROM airport;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot WHERE Age >= 25;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot WHERE Age >= 25;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot ORDER BY Name ASC;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot ORDER BY Name ASC;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22";
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot ORDER BY Age DESC;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Name FROM pilot ORDER BY Age DESC;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH);
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH);
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN...
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN...
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1;
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia');
Tables: pilot, aircraft, match, airport, airport_aircraft Columns: pilot.Pilot_Id, pilot.Name, pilot.Age, aircraft.Aircraft_ID, aircraft.Aircraft, aircraft.Description, aircraft.Max_Gross_Weight, aircraft.Total_disk_area, aircraft.Max_disk_Loading, match.Round, match.Location, match.Country, match.Date, match.Fastest_Q...
SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia');
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party';
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T1.service_id , T1.service_details , count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY count(*) DESC LIMIT 1;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T1.thing_id , T1.type_of_Thing_Code , T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT DISTINCT T2.thing_id , T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21';
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied';
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT max(date_moved_in) FROM Residents;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%';
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT customer_event_id , date_moved_in , property_id FROM customer_events;
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events );
Tables: Customers, Properties, Residents, Organizations, Services, Residents_Services, Things, Customer_Events, Customer_Event_Notes, Timed_Status_of_Things, Timed_Locations_of_Things Columns: Customers.customer_id, Customers.customer_details, Properties.property_id, Properties.property_type_code, Properties.property_a...
SELECT DISTINCT date_moved_in FROM residents;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT count(*) FROM school;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT count(*) FROM school;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT LOCATION FROM school ORDER BY Enrollment ASC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT LOCATION FROM school ORDER BY Enrollment ASC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT LOCATION FROM school ORDER BY Founded DESC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT LOCATION FROM school ORDER BY Founded DESC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Enrollment FROM school WHERE Denomination != "Catholic";
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Enrollment FROM school WHERE Denomination != "Catholic";
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT avg(Enrollment) FROM school;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT avg(Enrollment) FROM school;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Team FROM player ORDER BY Team ASC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Team FROM player ORDER BY Team ASC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT count(DISTINCT POSITION) FROM player;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT count(DISTINCT POSITION) FROM player;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Team FROM player ORDER BY Age DESC LIMIT 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Team FROM player ORDER BY Age DESC LIMIT 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Team FROM player ORDER BY Age DESC LIMIT 5;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Team FROM player ORDER BY Age DESC LIMIT 5;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player);
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player);
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Nickname FROM school_details WHERE Division != "Division 1";
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Nickname FROM school_details WHERE Division != "Division 1";
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1;
Tables: school, school_details, school_performance, player Columns: school.School_ID, school.School, school.Location, school.Enrollment, school.Founded, school.Denomination, school.Boys_or_Girls, school.Day_or_Boarding, school.Year_Entered_Competition, school.School_Colors, school_details.School_ID, school_details.Nick...
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1;