db_id
stringlengths
4
31
text
stringlengths
370
4.84k
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the descriptions for the aircrafts? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select description from aircraft
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of international passengers of all airports? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select avg ( international_passengers ) from airport
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of international passengers for an airport? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select avg ( international_passengers ) from airport
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the number of international and domestic passengers of the airport named London "Heathrow"? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select international_passengers , domestic_passengers from airport where airport_name = 'London Heathrow'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many international and domestic passengers are there in the airport London Heathrow? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select international_passengers , domestic_passengers from airport where airport_name = 'London Heathrow'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the total number of Domestic Passengers of airports that contain the word "London". | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select sum ( domestic_passengers ) from airport where airport_name like '%London%'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the total number of domestic passengers at all London airports? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select sum ( domestic_passengers ) from airport where airport_name like '%London%'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and minimum number of transit passengers of all aiports. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select max ( transit_passengers ) , min ( transit_passengers ) from airport
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the maximum and mininum number of transit passengers for all airports? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select max ( transit_passengers ) , min ( transit_passengers ) from airport
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the name of pilots aged 25 or older? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot where age >= 25
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is the name of every pilot who is at least 25 years old? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot where age >= 25
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all pilot names in ascending alphabetical order. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot order by name asc
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the pilots in alphabetical order? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot order by name asc
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List names of all pilot aged 30 or younger in descending alphabetical order. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot where age <= 30 order by name desc
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all pilots 30 years old or young in descending alphabetical order? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot where age <= 30 order by name desc
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the names of aircrafts associated with airport with name "London Gatwick". | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all the aircrafts associated with London Gatwick airport? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft , aircraft.description from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.total_passengers > 10000000
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft , aircraft.description from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.total_passengers > 10000000
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select avg ( airport.total_passengers ) from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where aircraft.aircraft = 'Robinson R-22'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average total number of passengers for all airports that the aircraft "Robinson R-22" visits? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select avg ( airport.total_passengers ) from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where aircraft.aircraft = 'Robinson R-22'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please list the location and the winning aircraft name. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select match.location , aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the location and name of the winning aircraft? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select match.location , aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of the aircraft that has been named winning aircraft the most number of times. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft order by count ( * ) desc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the aircraft that has won an award the most? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft order by count ( * ) desc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of aircrafts and the number of times it won matches. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft , count ( * ) from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each aircraft that has won an award, what is its name and how many time has it won? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft , count ( * ) from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List names of all pilot in descending order of age. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot order by age desc
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all pilots listed by descending age? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot order by age desc
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of aircrafts and that won matches at least twice. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft having count ( * ) >= 2
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all aircrafts that have won a match at least twice? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft having count ( * ) >= 2
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of aircrafts and that did not win any match. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft from aircraft where aircraft_id not in ( select winning_aircraft from match )
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all aicrafts that have never won any match? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft from aircraft where aircraft_id not in ( select winning_aircraft from match )
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick" | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Heathrow' intersect select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Heathrow' intersect select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all information on the airport that has the largest number of international passengers. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select * from airport order by international_passengers desc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is all the information on the airport with the largest number of international passengers? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select * from airport order by international_passengers desc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot where pilot.age < 30 group by match.winning_pilot order by count ( * ) desc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name and age of the pilot younger than 30 who has won the most number of times? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot where pilot.age < 30 group by match.winning_pilot order by count ( * ) desc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is the name and age of the youngest winning pilot? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot order by pilot.age asc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How old is the youngest winning pilot and what is their name? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot order by pilot.age asc limit 1
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the name of pilots who did not win the matches held in the country of Australia. | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot where pilot_id not in ( select winning_pilot from match where country = 'Australia' )
aircraft
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the pilots that have not won any matches in Australia? | 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_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | ### Response: select name from pilot where pilot_id not in ( select winning_pilot from match where country = 'Australia' )
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many residents does each property have? List property id and resident count. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select properties.property_id , count ( * ) from properties join residents on properties.property_id = residents.property_id group by properties.property_id
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select distinct services.service_type_code from services join organizations on services.organization_id = organizations.organization_id where organizations.organization_details = 'Denesik and Sons Party'
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many services has each resident requested? List the resident id, details, and the count in descending order of the count. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select residents.resident_id , residents.other_details , count ( * ) from residents join residents_services on residents.resident_id = residents_services.resident_id group by residents.resident_id order by count ( * ) desc
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the maximum number that a certain service is provided? List the service id, details and number. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select services.service_id , services.service_details , count ( * ) from services join residents_services on services.service_id = residents_services.service_id group by services.service_id order by count ( * ) desc limit 1
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the id and type of each thing, and the details of the organization that owns it. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select things.thing_id , things.type_of_thing_code , organizations.organization_details from things join organizations on things.organization_id = organizations.organization_id
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the id and details of the customers who have at least 3 events? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select customers.customer_id , customers.customer_details from customers join customer_events on customers.customer_id = customer_events.customer_id group by customers.customer_id having count ( * ) >= 3
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is each customer's move in date, and the corresponding customer id and details? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select customer_events.date_moved_in , customers.customer_id , customers.customer_details from customers join customer_events on customers.customer_id = customer_events.customer_id
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which events have the number of notes between one and three? List the event id and the property id. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select customer_events.customer_event_id , customer_events.property_id from customer_events join customer_event_notes on customer_events.customer_event_id = customer_event_notes.customer_event_id group by customer_events.customer_event_id having count ( * ) between 1 and 3
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: 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' | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select distinct things.thing_id , things.type_of_thing_code from timed_status_of_things join things on timed_status_of_things.thing_id = things.thing_id where timed_status_of_things.status_of_thing_code = 'Close' or timed_status_of_things.date_and_date < '2017-06-19 02:59:21'
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct locations have the things with service detail 'Unsatisfied' been located in? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select count ( distinct timed_locations_of_things.location_code ) from things join timed_locations_of_things on things.thing_id = timed_locations_of_things.thing_id where things.service_details = 'Unsatisfied'
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different status codes of things are there? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select count ( distinct status_of_thing_code ) from timed_status_of_things
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which organizations are not a parent organization of others? List the organization id. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select organization_id from organizations except select parent_organization_id from organizations
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When is the last day any resident moved in? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select max ( date_moved_in ) from residents
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the resident details containing the substring 'Miss'? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select other_details from residents where other_details like '%Miss%'
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the customer event id and the corresponding move in date and property id. | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select customer_event_id , date_moved_in , property_id from customer_events
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many customers did not have any event? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select count ( * ) from customers where customer_id not in ( select customer_id from customer_events )
local_govt_and_lot
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct move in dates of the residents? | 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_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | ### Response: select distinct date_moved_in from residents
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many schools are there? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select count ( * ) from school
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of schools. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select count ( * ) from school
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the locations of schools in ascending order of enrollment. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select location from school order by enrollment asc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the list of school locations sorted in ascending order of school enrollment? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select location from school order by enrollment asc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the locations of schools in descending order of founded year. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select location from school order by founded desc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the list of school locations sorted in descending order of school foundation year? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select location from school order by founded desc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the enrollments of schools whose denomination is not "Catholic"? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select enrollment from school where denomination != 'Catholic'
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the enrollment for each school that does not have "Catholic" as denomination. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select enrollment from school where denomination != 'Catholic'
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average enrollment of schools? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select avg ( enrollment ) from school
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Take the average of the school enrollment. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select avg ( enrollment ) from school
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the teams of the players, sorted in ascending alphabetical order? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select team from player order by team asc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the team of each player and sort them in ascending alphabetical order. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select team from player order by team asc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different positions of players are there? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select count ( distinct position ) from player
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of distinct player positions. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select count ( distinct position ) from player
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the team of the player of the highest age. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select team from player order by age desc limit 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which team has the oldest player? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select team from player order by age desc limit 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the teams of the players with the top 5 largest ages. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select team from player order by age desc limit 5
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the teams that have the 5 oldest players? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select team from player order by age desc limit 5
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each player, show the team and the location of school they belong to. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select player.team , school.location from player join school on player.school_id = school.school_id
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the team and the location of school each player belongs to? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select player.team , school.location from player join school on player.school_id = school.school_id
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the locations of schools that have more than 1 player. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school.location from player join school on player.school_id = school.school_id group by player.school_id having count ( * ) > 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which schools have more than 1 player? Give me the school locations. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school.location from player join school on player.school_id = school.school_id group by player.school_id having count ( * ) > 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the denomination of the school that has the most players. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school.denomination from player join school on player.school_id = school.school_id group by player.school_id order by count ( * ) desc limit 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the denomination of the school the most players belong to? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school.denomination from player join school on player.school_id = school.school_id group by player.school_id order by count ( * ) desc limit 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show locations and nicknames of schools. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school.location , school_details.nickname from school join school_details on school.school_id = school_details.school_id
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the location and nickname of each school? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school.location , school_details.nickname from school join school_details on school.school_id = school_details.school_id
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show different denominations and the corresponding number of schools. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination , count ( * ) from school group by denomination
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each denomination, return the denomination and the count of schools with that denomination. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination , count ( * ) from school group by denomination
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show different denominations and the corresponding number of schools in descending order. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination , count ( * ) from school group by denomination order by count ( * ) desc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination , count ( * ) from school group by denomination order by count ( * ) desc
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the school color of the school that has the largest enrollment. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school_colors from school order by enrollment desc limit 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the school color of the school with the largest enrollment? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select school_colors from school order by enrollment desc limit 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the locations of schools that do not have any player. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select location from school where school_id not in ( select school_id from player )
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which schools do not have any player? Give me the school locations. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select location from school where school_id not in ( select school_id from player )
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the denomination shared by schools founded before 1890 and schools founded after 1900 | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the denominations used by both schools founded before 1890 and schools founded after 1900? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the nicknames of schools that are not in division 1. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select nickname from school_details where division != 'Division 1'
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the nicknames of schools whose division is not 1? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select nickname from school_details where division != 'Division 1'
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the denomination shared by more than one school. | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination from school group by denomination having count ( * ) > 1
school_player
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the denomination more than one school have? | 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 , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | ### Response: select denomination from school group by denomination having count ( * ) > 1