db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
aircraft | select description from aircraft | Question: what are the descriptions for the aircrafts? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID, Airport... | what are the descriptions for the aircrafts? |
aircraft | select avg(international_passengers) from airport | Question: what is the average number of international passengers of all airports? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. air... | what is the average number of international passengers of all airports? |
aircraft | select avg(international_passengers) from airport | Question: what is the average number of international passengers for an airport? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airp... | what is the average number of international passengers for an airport? |
aircraft | select international_passengers , domestic_passengers from airport where airport_name = 'london heathrow' | Question: what are the number of international and domestic passengers of the airport named london 'heathrow'? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning... | what are the number of international and domestic passengers of the airport named london 'heathrow'? |
aircraft | select international_passengers , domestic_passengers from airport where airport_name = 'london heathrow' | Question: how many international and domestic passengers are there in the airport london heathrow? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winn... | how many international and domestic passengers are there in the airport london heathrow? |
aircraft | select sum(domestic_passengers) from airport where airport_name like '%london%' | Question: what are the total number of domestic passengers of airports that contain the word 'london'. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, ... | what are the total number of domestic passengers of airports that contain the word 'london'. |
aircraft | select sum(domestic_passengers) from airport where airport_name like '%london%' | Question: what are the total number of domestic passengers at all london airports? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. ai... | what are the total number of domestic passengers at all london airports? |
aircraft | select max(transit_passengers) , min(transit_passengers) from airport | Question: what are the maximum and minimum number of transit passengers of all aiports. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraf... | what are the maximum and minimum number of transit passengers of all aiports. |
aircraft | select max(transit_passengers) , min(transit_passengers) from airport | Question: what is the maximum and mininum number of transit passengers for all airports? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircra... | what is the maximum and mininum number of transit passengers for all airports? |
aircraft | select name from pilot where age >= 25 | Question: what are the name of pilots aged 25 or older? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID, Airpor... | what are the name of pilots aged 25 or older? |
aircraft | select name from pilot where age >= 25 | Question: what is the name of every pilot who is at least 25 years old? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Ai... | what is the name of every pilot who is at least 25 years old? |
aircraft | select name from pilot order by name asc | Question: list all pilot names in ascending alphabetical order. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID... | list all pilot names in ascending alphabetical order. |
aircraft | select name from pilot order by name asc | Question: what are the names of the pilots in alphabetical order? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_... | what are the names of the pilots in alphabetical order? |
aircraft | select name from pilot where age <= 30 order by name desc | Question: list names of all pilot aged 30 or younger in descending alphabetical order. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft... | list names of all pilot aged 30 or younger in descending alphabetical order. |
aircraft | select name from pilot where age <= 30 order by name desc | Question: what are the names of all pilots 30 years old or young in descending alphabetical order? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winn... | what are the names of all pilots 30 years old or young in descending alphabetical order? |
aircraft | 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' | Question: please show the names of aircrafts associated with airport with name 'london gatwick'. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winnin... | please show the names of aircrafts associated with airport with name 'london gatwick'. |
aircraft | 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' | Question: what are the names of all the aircrafts associated with london gatwick airport? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircr... | what are the names of all the aircrafts associated with london gatwick airport? |
aircraft | 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 | Question: please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Count... | please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. |
aircraft | 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 | Question: what are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastes... | what are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000? |
aircraft | 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' | Question: what is the average total number of passengers of airports that are associated with aircraft 'robinson r-22'? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying... | what is the average total number of passengers of airports that are associated with aircraft 'robinson r-22'? |
aircraft | 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' | Question: what is the average total number of passengers for all airports that the aircraft 'robinson r-22' visits? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Wi... | what is the average total number of passengers for all airports that the aircraft 'robinson r-22' visits? |
aircraft | select t2.location , t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft | Question: please list the location and the winning aircraft name. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_... | please list the location and the winning aircraft name. |
aircraft | select t2.location , t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft | Question: what is the location and name of the winning aircraft? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_I... | what is the location and name of the winning aircraft? |
aircraft | 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 | Question: list the name of the aircraft that has been named winning aircraft the most number of times. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, ... | list the name of the aircraft that has been named winning aircraft the most number of times. |
aircraft | 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 | Question: what is the name of the aircraft that has won an award the most? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport ->... | what is the name of the aircraft that has won an award the most? |
aircraft | select t1.aircraft , count(*) from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft | Question: list the names of aircrafts and the number of times it won matches. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport... | list the names of aircrafts and the number of times it won matches. |
aircraft | select t1.aircraft , count(*) from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft | Question: for each aircraft that has won an award, what is its name and how many time has it won? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winni... | for each aircraft that has won an award, what is its name and how many time has it won? |
aircraft | select name from pilot order by age desc | Question: list names of all pilot in descending order of age. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID, ... | list names of all pilot in descending order of age. |
aircraft | select name from pilot order by age desc | Question: what are the names of all pilots listed by descending age? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airpo... | what are the names of all pilots listed by descending age? |
aircraft | 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 | Question: list the names of aircrafts and that won matches at least twice. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport ->... | list the names of aircrafts and that won matches at least twice. |
aircraft | 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 | Question: what are the names of all aircrafts that have won a match at least twice? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. a... | what are the names of all aircrafts that have won a match at least twice? |
aircraft | select aircraft from aircraft where aircraft_id not in (select winning_aircraft from match) | Question: list the names of aircrafts and that did not win any match. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airp... | list the names of aircrafts and that did not win any match. |
aircraft | select aircraft from aircraft where aircraft_id not in (select winning_aircraft from match) | Question: what are the names of all aicrafts that have never won any match? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -... | what are the names of all aicrafts that have never won any match? |
aircraft | 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... | Question: show the names of aircrafts that are associated with both an airport named 'london heathrow' and an airport named 'london gatwick' | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Dat... | show the names of aircrafts that are associated with both an airport named 'london heathrow' and an airport named 'london gatwick' |
aircraft | 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... | Question: what are the names of all aircrafts that are associated with both london heathrow and gatwick airports? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winn... | what are the names of all aircrafts that are associated with both london heathrow and gatwick airports? |
aircraft | select * from airport order by international_passengers desc limit 1 | Question: show all information on the airport that has the largest number of international passengers. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, ... | show all information on the airport that has the largest number of international passengers. |
aircraft | select * from airport order by international_passengers desc limit 1 | Question: what is all the information on the airport with the largest number of international passengers? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilo... | what is all the information on the airport with the largest number of international passengers? |
aircraft | 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 | Question: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualif... | find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. |
aircraft | 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 | Question: what is the name and age of the pilot younger than 30 who has won the most number of times? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, W... | what is the name and age of the pilot younger than 30 who has won the most number of times? |
aircraft | 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 | Question: what is the name and age of the youngest winning pilot? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_... | what is the name and age of the youngest winning pilot? |
aircraft | 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 | Question: how old is the youngest winning pilot and what is their name? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Ai... | how old is the youngest winning pilot and what is their name? |
aircraft | select name from pilot where pilot_id not in (select winning_pilot from match where country = 'australia') | Question: find the name of pilots who did not win the matches held in the country of australia. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning... | find the name of pilots who did not win the matches held in the country of australia. |
aircraft | select name from pilot where pilot_id not in (select winning_pilot from match where country = 'australia') | Question: what are the names of the pilots that have not won any matches in australia? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft... | what are the names of the pilots that have not won any matches in australia? |
local_govt_and_lot | 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 | Question: how many residents does each property have? list property id and resident count. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizati... | how many residents does each property have? list property id and resident count. |
local_govt_and_lot | 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' | Question: what is the distinct service types that are provided by the organization which has detail 'denesik and sons party'? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_m... | what is the distinct service types that are provided by the organization which has detail 'denesik and sons party'? |
local_govt_and_lot | 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 | Question: how many services has each resident requested? list the resident id, details, and the count in descending order of the count. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_... | how many services has each resident requested? list the resident id, details, and the count in descending order of the count. |
local_govt_and_lot | 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 | Question: what is the maximum number that a certain service is provided? list the service id, details and number. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, ot... | what is the maximum number that a certain service is provided? list the service id, details and number. |
local_govt_and_lot | 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 | Question: list the id and type of each thing, and the details of the organization that owns it. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organ... | list the id and type of each thing, and the details of the organization that owns it. |
local_govt_and_lot | 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 | Question: what are the id and details of the customers who have at least 3 events? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizations -> o... | what are the id and details of the customers who have at least 3 events? |
local_govt_and_lot | 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 | Question: what is each customer's move in date, and the corresponding customer id and details? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organi... | what is each customer's move in date, and the corresponding customer id and details? |
local_govt_and_lot | 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 | Question: which events have the number of notes between one and three? list the event id and the property id. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_... | which events have the number of notes between one and three? list the event id and the property id. |
local_govt_and_lot | 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' | Question: what are the distinct id and type of the thing that has the status 'close' or has a status record before the date '2017-06-19 02:59:21' | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, d... | what are the distinct id and type of the thing that has the status 'close' or has a status record before the date '2017-06-19 02:59:21' |
local_govt_and_lot | 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' | Question: how many distinct locations have the things with service detail 'unsatisfied' been located in? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_detai... | how many distinct locations have the things with service detail 'unsatisfied' been located in? |
local_govt_and_lot | select count(distinct status_of_thing_code) from timed_status_of_things | Question: how many different status codes of things are there? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizations -> organization_id, pare... | how many different status codes of things are there? |
local_govt_and_lot | select organization_id from organizations except select parent_organization_id from organizations | Question: which organizations are not a parent organization of others? list the organization id. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Orga... | which organizations are not a parent organization of others? list the organization id. |
local_govt_and_lot | select max(date_moved_in) from residents | Question: when is the last day any resident moved in? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizations -> organization_id, parent_organi... | when is the last day any resident moved in? |
local_govt_and_lot | select other_details from residents where other_details like '%miss%' | Question: what are the resident details containing the substring 'miss'? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizations -> organizatio... | what are the resident details containing the substring 'miss'? |
local_govt_and_lot | select customer_event_id , date_moved_in , property_id from customer_events | Question: list the customer event id and the corresponding move in date and property id. | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organization... | list the customer event id and the corresponding move in date and property id. |
local_govt_and_lot | select count(*) from customers where customer_id not in ( select customer_id from customer_events ) | Question: how many customers did not have any event? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizations -> organization_id, parent_organiz... | how many customers did not have any event? |
local_govt_and_lot | select distinct date_moved_in from residents | Question: what are the distinct move in dates of the residents? | Tables: Customers -> customer_id, customer_details. Properties -> property_id, property_type_code, property_address, other_details. Residents -> resident_id, property_id, date_moved_in, date_moved_out, other_details. Organizations -> organization_id, par... | what are the distinct move in dates of the residents? |
school_player | select count(*) from school | Question: how many schools are there? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, School_Year, Class_A... | how many schools are there? |
school_player | select count(*) from school | Question: count the number of schools. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, School_Year, Class_... | count the number of schools. |
school_player | select location from school order by enrollment asc | Question: list the locations of schools in ascending order of enrollment. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performanc... | list the locations of schools in ascending order of enrollment. |
school_player | select location from school order by enrollment asc | Question: what is the list of school locations sorted in ascending order of school enrollment? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Divisi... | what is the list of school locations sorted in ascending order of school enrollment? |
school_player | select location from school order by founded desc | Question: list the locations of schools in descending order of founded year. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perform... | list the locations of schools in descending order of founded year. |
school_player | select location from school order by founded desc | Question: what is the list of school locations sorted in descending order of school foundation year? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, ... | what is the list of school locations sorted in descending order of school foundation year? |
school_player | select enrollment from school where denomination != 'catholic' | Question: what are the enrollments of schools whose denomination is not 'catholic'? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_... | what are the enrollments of schools whose denomination is not 'catholic'? |
school_player | select enrollment from school where denomination != 'catholic' | Question: list the enrollment for each school that does not have 'catholic' as denomination. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division... | list the enrollment for each school that does not have 'catholic' as denomination. |
school_player | select avg(enrollment) from school | Question: what is the average enrollment of schools? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, Schoo... | what is the average enrollment of schools? |
school_player | select avg(enrollment) from school | Question: take the average of the school enrollment. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, Schoo... | take the average of the school enrollment. |
school_player | select team from player order by team asc | Question: what are the teams of the players, sorted in ascending alphabetical order? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school... | what are the teams of the players, sorted in ascending alphabetical order? |
school_player | select team from player order by team asc | Question: find the team of each player and sort them in ascending alphabetical order. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. schoo... | find the team of each player and sort them in ascending alphabetical order. |
school_player | select count(distinct position) from player | Question: how many different positions of players are there? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_I... | how many different positions of players are there? |
school_player | select count(distinct position) from player | Question: count the number of distinct player positions. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, S... | count the number of distinct player positions. |
school_player | select team from player order by age desc limit 1 | Question: find the team of the player of the highest age. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, ... | find the team of the player of the highest age. |
school_player | select team from player order by age desc limit 1 | Question: which team has the oldest player? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, School_Year, C... | which team has the oldest player? |
school_player | select team from player order by age desc limit 5 | Question: list the teams of the players with the top 5 largest ages. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> ... | list the teams of the players with the top 5 largest ages. |
school_player | select team from player order by age desc limit 5 | Question: what are the teams that have the 5 oldest players? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_I... | what are the teams that have the 5 oldest players? |
school_player | select t1.team , t2.location from player as t1 join school as t2 on t1.school_id = t2.school_id | Question: for each player, show the team and the location of school they belong to. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_... | for each player, show the team and the location of school they belong to. |
school_player | select t1.team , t2.location from player as t1 join school as t2 on t1.school_id = t2.school_id | Question: what are the team and the location of school each player belongs to? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perfo... | what are the team and the location of school each player belongs to? |
school_player | 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 | Question: show the locations of schools that have more than 1 player. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance ->... | show the locations of schools that have more than 1 player. |
school_player | 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 | Question: which schools have more than 1 player? give me the school locations. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perfo... | which schools have more than 1 player? give me the school locations. |
school_player | 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 | Question: show the denomination of the school that has the most players. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance... | show the denomination of the school that has the most players. |
school_player | 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 | Question: what is the denomination of the school the most players belong to? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perform... | what is the denomination of the school the most players belong to? |
school_player | select t1.location , t2.nickname from school as t1 join school_details as t2 on t1.school_id = t2.school_id | Question: show locations and nicknames of schools. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_Id, School_... | show locations and nicknames of schools. |
school_player | select t1.location , t2.nickname from school as t1 join school_details as t2 on t1.school_id = t2.school_id | Question: what are the location and nickname of each school? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School_I... | what are the location and nickname of each school? |
school_player | select denomination , count(*) from school group by denomination | Question: please show different denominations and the corresponding number of schools. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. scho... | please show different denominations and the corresponding number of schools. |
school_player | select denomination , count(*) from school group by denomination | Question: for each denomination, return the denomination and the count of schools with that denomination. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Cl... | for each denomination, return the denomination and the count of schools with that denomination. |
school_player | select denomination , count(*) from school group by denomination order by count(*) desc | Question: please show different denominations and the corresponding number of schools in descending order. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, C... | please show different denominations and the corresponding number of schools in descending order. |
school_player | select denomination , count(*) from school group by denomination order by count(*) desc | Question: order denominations in descending order of the count of schools with the denomination. return each denomination with the count of schools. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details... | order denominations in descending order of the count of schools with the denomination. return each denomination with the count of schools. |
school_player | select school_colors from school order by enrollment desc limit 1 | Question: list the school color of the school that has the largest enrollment. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perfo... | list the school color of the school that has the largest enrollment. |
school_player | select school_colors from school order by enrollment desc limit 1 | Question: what is the school color of the school with the largest enrollment? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perfor... | what is the school color of the school with the largest enrollment? |
school_player | select location from school where school_id not in (select school_id from player) | Question: list the locations of schools that do not have any player. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> ... | list the locations of schools that do not have any player. |
school_player | select location from school where school_id not in (select school_id from player) | Question: which schools do not have any player? give me the school locations. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_perfor... | which schools do not have any player? give me the school locations. |
school_player | select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900 | Question: show the denomination shared by schools founded before 1890 and schools founded after 1900 | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, ... | show the denomination shared by schools founded before 1890 and schools founded after 1900 |
school_player | select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900 | Question: what are the denominations used by both schools founded before 1890 and schools founded after 1900? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, Leagu... | what are the denominations used by both schools founded before 1890 and schools founded after 1900? |
school_player | select nickname from school_details where division != 'division 1' | Question: show the nicknames of schools that are not in division 1. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> S... | show the nicknames of schools that are not in division 1. |
school_player | select nickname from school_details where division != 'division 1' | Question: what are the nicknames of schools whose division is not 1? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> ... | what are the nicknames of schools whose division is not 1? |
school_player | select denomination from school group by denomination having count(*) > 1 | Question: show the denomination shared by more than one school. | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> Schoo... | show the denomination shared by more than one school. |
school_player | select denomination from school group by denomination having count(*) > 1 | Question: what are the denomination more than one school have? | Tables: school -> School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors. school_details -> School_ID, Nickname, Colors, League, Class, Division. school_performance -> School... | what are the denomination more than one school have? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.