input
stringlengths
667
7.62k
output
stringlengths
41
600
db_id
stringlengths
3
31
query
stringlengths
18
577
question
stringlengths
3
224
schema
stringlengths
177
6.14k
primary_keys
stringlengths
16
545
foreign_keys
stringlengths
16
1.48k
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the descriptions for the aircrafts?</question> [SQL]:
<SQL_QUERY>SELECT Description FROM aircraft</SQL_QUERY>
aircraft
SELECT Description FROM aircraft
What are the descriptions for the aircrafts?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the average number of international passengers of all airports?</question> [SQL]:
<SQL_QUERY>SELECT avg(International_Passengers) FROM airport</SQL_QUERY>
aircraft
SELECT avg(International_Passengers) FROM airport
What is the average number of international passengers of all airports?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the average number of international passengers for an airport?</question> [SQL]:
<SQL_QUERY>SELECT avg(International_Passengers) FROM airport</SQL_QUERY>
aircraft
SELECT avg(International_Passengers) FROM airport
What is the average number of international passengers for an airport?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the number of international and domestic passengers of the airport named London "Heathrow"?</question> [SQL]:
<SQL_QUERY>SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow"</SQL_QUERY>
aircraft
SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow"
What are the number of international and domestic passengers of the airport named London "Heathrow"?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How many international and domestic passengers are there in the airport London Heathrow?</question> [SQL]:
<SQL_QUERY>SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow"</SQL_QUERY>
aircraft
SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow"
How many international and domestic passengers are there in the airport London Heathrow?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the total number of Domestic Passengers of airports that contain the word "London".</question> [SQL]:
<SQL_QUERY>SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"</SQL_QUERY>
aircraft
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
What are the total number of Domestic Passengers of airports that contain the word "London".
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the total number of domestic passengers at all London airports?</question> [SQL]:
<SQL_QUERY>SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"</SQL_QUERY>
aircraft
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
What are the total number of domestic passengers at all London airports?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the maximum and minimum number of transit passengers of all aiports.</question> [SQL]:
<SQL_QUERY>SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport</SQL_QUERY>
aircraft
SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport
What are the maximum and minimum number of transit passengers of all aiports.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the maximum and mininum number of transit passengers for all airports?</question> [SQL]:
<SQL_QUERY>SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport</SQL_QUERY>
aircraft
SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport
What is the maximum and mininum number of transit passengers for all airports?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the name of pilots aged 25 or older?</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot WHERE Age >= 25</SQL_QUERY>
aircraft
SELECT Name FROM pilot WHERE Age >= 25
What are the name of pilots aged 25 or older?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>what is the name of every pilot who is at least 25 years old?</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot WHERE Age >= 25</SQL_QUERY>
aircraft
SELECT Name FROM pilot WHERE Age >= 25
what is the name of every pilot who is at least 25 years old?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List all pilot names in ascending alphabetical order.</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot ORDER BY Name ASC</SQL_QUERY>
aircraft
SELECT Name FROM pilot ORDER BY Name ASC
List all pilot names in ascending alphabetical order.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of the pilots in alphabetical order?</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot ORDER BY Name ASC</SQL_QUERY>
aircraft
SELECT Name FROM pilot ORDER BY Name ASC
What are the names of the pilots in alphabetical order?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List names of all pilot aged 30 or younger in descending alphabetical order.</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC</SQL_QUERY>
aircraft
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC
List names of all pilot aged 30 or younger in descending alphabetical order.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of all pilots 30 years old or young in descending alphabetical order?</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC</SQL_QUERY>
aircraft
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC
What are the names of all pilots 30 years old or young in descending alphabetical order?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Please show the names of aircrafts associated with airport with name "London Gatwick".</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
Please show the names of aircrafts associated with airport with name "London Gatwick".
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of all the aircrafts associated with London Gatwick airport?</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
What are the names of all the aircrafts associated with London Gatwick airport?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000</SQL_QUERY>
aircraft
SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000
Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000</SQL_QUERY>
aircraft
SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000
What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"?</question> [SQL]:
<SQL_QUERY>SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"</SQL_QUERY>
aircraft
SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"
What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the average total number of passengers for all airports that the aircraft "Robinson R-22" visits?</question> [SQL]:
<SQL_QUERY>SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"</SQL_QUERY>
aircraft
SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"
What is the average total number of passengers for all airports that the aircraft "Robinson R-22" visits?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Please list the location and the winning aircraft name.</question> [SQL]:
<SQL_QUERY>SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft</SQL_QUERY>
aircraft
SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
Please list the location and the winning aircraft name.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the location and name of the winning aircraft?</question> [SQL]:
<SQL_QUERY>SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft</SQL_QUERY>
aircraft
SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
What is the location and name of the winning aircraft?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List the name of the aircraft that has been named winning aircraft the most number of times.</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
List the name of the aircraft that has been named winning aircraft the most number of times.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the name of the aircraft that has won an award the most?</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the aircraft that has won an award the most?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List the names of aircrafts and the number of times it won matches.</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft</SQL_QUERY>
aircraft
SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
List the names of aircrafts and the number of times it won matches.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>For each aircraft that has won an award, what is its name and how many time has it won?</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft</SQL_QUERY>
aircraft
SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
For each aircraft that has won an award, what is its name and how many time has it won?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List names of all pilot in descending order of age.</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot ORDER BY Age DESC</SQL_QUERY>
aircraft
SELECT Name FROM pilot ORDER BY Age DESC
List names of all pilot in descending order of age.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of all pilots listed by descending age?</question> [SQL]:
<SQL_QUERY>SELECT Name FROM pilot ORDER BY Age DESC</SQL_QUERY>
aircraft
SELECT Name FROM pilot ORDER BY Age DESC
What are the names of all pilots listed by descending age?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List the names of aircrafts and that won matches at least twice.</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2
List the names of aircrafts and that won matches at least twice.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of all aircrafts that have won a match at least twice?</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2
What are the names of all aircrafts that have won a match at least twice?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List the names of aircrafts and that did not win any match.</question> [SQL]:
<SQL_QUERY>SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)</SQL_QUERY>
aircraft
SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
List the names of aircrafts and that did not win any match.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of all aicrafts that have never won any match?</question> [SQL]:
<SQL_QUERY>SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)</SQL_QUERY>
aircraft
SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
What are the names of all aicrafts that have never won any match?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick"</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick"
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?</question> [SQL]:
<SQL_QUERY>SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"</SQL_QUERY>
aircraft
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Show all information on the airport that has the largest number of international passengers.</question> [SQL]:
<SQL_QUERY>SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1</SQL_QUERY>
aircraft
SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
Show all information on the airport that has the largest number of international passengers.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is all the information on the airport with the largest number of international passengers?</question> [SQL]:
<SQL_QUERY>SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1</SQL_QUERY>
aircraft
SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
What is all the information on the airport with the largest number of international passengers?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.</question> [SQL]:
<SQL_QUERY>SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>
aircraft
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1
find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the name and age of the pilot younger than 30 who has won the most number of times?</question> [SQL]:
<SQL_QUERY>SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>
aircraft
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1
What is the name and age of the pilot younger than 30 who has won the most number of times?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>what is the name and age of the youngest winning pilot?</question> [SQL]:
<SQL_QUERY>SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1</SQL_QUERY>
aircraft
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1
what is the name and age of the youngest winning pilot?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How old is the youngest winning pilot and what is their name?</question> [SQL]:
<SQL_QUERY>SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1</SQL_QUERY>
aircraft
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1
How old is the youngest winning pilot and what is their name?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>find the name of pilots who did not win the matches held in the country of Australia.</question> [SQL]:
<SQL_QUERY>SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')</SQL_QUERY>
aircraft
SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
find the name of pilots who did not win the matches held in the country of Australia.
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);</schema>" <primary_keys>[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the names of the pilots that have not won any matches in Australia?</question> [SQL]:
<SQL_QUERY>SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')</SQL_QUERY>
aircraft
SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
What are the names of the pilots that have not won any matches in Australia?
[Schema (values) (types)]: | aircraft | pilot : pilot_id (text) , name (number) , age (text) | aircraft : aircraft_id (text) , aircraft (number) , description (text) , max_gross_weight (number) , total_disk_area (number) , max_disk_loading (text) | match : round (text) , location (number) , country (text) , date (number) , fastest_qualifying (number) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (text) , airport_name (number) , total_passengers (text) , %_change_2007 (number) , international_passengers (number) , domestic_passengers (text) , transit_passengers (text) , aircraft_movements (text) , freight_metric_tonnes (text) | airport_aircraft : id (text) , airport_id (number) , aircraft_id (text);
[Primary Keys]: pilot : pilot_id, aircraft : aircraft_id, match : round, airport : airport_id, airport_aircraft : airport_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How many residents does each property have? List property id and resident count.</question> [SQL]:
<SQL_QUERY>SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id</SQL_QUERY>
local_govt_and_lot
SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id
How many residents does each property have? List property id and resident count.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'</SQL_QUERY>
local_govt_and_lot
SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'
What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How many services has each resident requested? List the resident id, details, and the count in descending order of the count.</question> [SQL]:
<SQL_QUERY>SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC</SQL_QUERY>
local_govt_and_lot
SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC
How many services has each resident requested? List the resident id, details, and the count in descending order of the count.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the maximum number that a certain service is provided? List the service id, details and number.</question> [SQL]:
<SQL_QUERY>SELECT T1.service_id , T1.service_details , count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>
local_govt_and_lot
SELECT T1.service_id , T1.service_details , count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY count(*) DESC LIMIT 1
What is the maximum number that a certain service is provided? List the service id, details and number.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List the id and type of each thing, and the details of the organization that owns it.</question> [SQL]:
<SQL_QUERY>SELECT T1.thing_id , T1.type_of_Thing_Code , T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id</SQL_QUERY>
local_govt_and_lot
SELECT T1.thing_id , T1.type_of_Thing_Code , T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id
List the id and type of each thing, and the details of the organization that owns it.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the id and details of the customers who have at least 3 events?</question> [SQL]:
<SQL_QUERY>SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3</SQL_QUERY>
local_govt_and_lot
SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3
What are the id and details of the customers who have at least 3 events?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What is each customer's move in date, and the corresponding customer id and details?</question> [SQL]:
<SQL_QUERY>SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id</SQL_QUERY>
local_govt_and_lot
SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id
What is each customer's move in date, and the corresponding customer id and details?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Which events have the number of notes between one and three? List the event id and the property id.</question> [SQL]:
<SQL_QUERY>SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3</SQL_QUERY>
local_govt_and_lot
SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3
Which events have the number of notes between one and three? List the event id and the property id.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT T2.thing_id , T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'</SQL_QUERY>
local_govt_and_lot
SELECT DISTINCT T2.thing_id , T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'
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'
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How many distinct locations have the things with service detail 'Unsatisfied' been located in?</question> [SQL]:
<SQL_QUERY>SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'</SQL_QUERY>
local_govt_and_lot
SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'
How many distinct locations have the things with service detail 'Unsatisfied' been located in?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How many different status codes of things are there?</question> [SQL]:
<SQL_QUERY>SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things</SQL_QUERY>
local_govt_and_lot
SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
How many different status codes of things are there?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>Which organizations are not a parent organization of others? List the organization id.</question> [SQL]:
<SQL_QUERY>SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations</SQL_QUERY>
local_govt_and_lot
SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
Which organizations are not a parent organization of others? List the organization id.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>When is the last day any resident moved in?</question> [SQL]:
<SQL_QUERY>SELECT max(date_moved_in) FROM Residents</SQL_QUERY>
local_govt_and_lot
SELECT max(date_moved_in) FROM Residents
When is the last day any resident moved in?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the resident details containing the substring 'Miss'?</question> [SQL]:
<SQL_QUERY>SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'</SQL_QUERY>
local_govt_and_lot
SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
What are the resident details containing the substring 'Miss'?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>List the customer event id and the corresponding move in date and property id.</question> [SQL]:
<SQL_QUERY>SELECT customer_event_id , date_moved_in , property_id FROM customer_events</SQL_QUERY>
local_govt_and_lot
SELECT customer_event_id , date_moved_in , property_id FROM customer_events
List the customer event id and the corresponding move in date and property id.
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>How many customers did not have any event?</question> [SQL]:
<SQL_QUERY>SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )</SQL_QUERY>
local_govt_and_lot
SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )
How many customers did not have any event?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);</schema>" <primary_keys>[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id</primary_keys>" <foreign_keys>[Foreign Keys]: 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</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the distinct move in dates of the residents?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT date_moved_in FROM residents</SQL_QUERY>
local_govt_and_lot
SELECT DISTINCT date_moved_in FROM residents
What are the distinct move in dates of the residents?
[Schema (values) (types)]: | local_govt_and_lot | Customers : customer_id (text) , customer_details (number) | Properties : property_id (text) , property_type_code (number) , property_address (text) , other_details (number) | Residents : resident_id (text) , property_id (number) , date_moved_in (text) , date_moved_out (number) , other_details (text) | Organizations : organization_id (text) , parent_organization_id (number) , organization_details (text) | Services : service_id (text) , organization_id (number) , service_type_code (text) , service_details (number) | Residents_Services : resident_id (text) , service_id (number) , date_moved_in (text) , property_id (number) , date_requested (text) , date_provided (text) , other_details (text) | Things : thing_id (text) , organization_id (number) , type_of_thing_code (text) , service_type_code (number) , service_details (text) | Customer_Events : customer_event_id (text) , customer_id (number) , date_moved_in (text) , property_id (number) , resident_id (text) , thing_id (text) | Customer_Event_Notes : customer_event_note_id (text) , customer_event_id (number) , service_type_code (text) , resident_id (number) , property_id (text) , date_moved_in (text) | Timed_Status_of_Things : thing_id (text) , date_and_date (number) , status_of_thing_code (text) | Timed_Locations_of_Things : thing_id (text) , date_and_time (number) , location_code (text);
[Primary Keys]: customers : customer_id, properties : property_id, residents : resident_id, organizations : organization_id, services : service_id, residents_services : resident_id, things : thing_id, customer_events : customer_event_id, customer_event_notes : customer_event_note_id, timed_status_of_things : thing_id, timed_locations_of_things : thing_id
[Foreign Keys]: 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
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>How many schools are there?</question> [SQL]:
<SQL_QUERY>SELECT count(*) FROM school</SQL_QUERY>
school_player
SELECT count(*) FROM school
How many schools are there?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Count the number of schools.</question> [SQL]:
<SQL_QUERY>SELECT count(*) FROM school</SQL_QUERY>
school_player
SELECT count(*) FROM school
Count the number of schools.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the locations of schools in ascending order of enrollment.</question> [SQL]:
<SQL_QUERY>SELECT LOCATION FROM school ORDER BY Enrollment ASC</SQL_QUERY>
school_player
SELECT LOCATION FROM school ORDER BY Enrollment ASC
List the locations of schools in ascending order of enrollment.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the list of school locations sorted in ascending order of school enrollment?</question> [SQL]:
<SQL_QUERY>SELECT LOCATION FROM school ORDER BY Enrollment ASC</SQL_QUERY>
school_player
SELECT LOCATION FROM school ORDER BY Enrollment ASC
What is the list of school locations sorted in ascending order of school enrollment?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the locations of schools in descending order of founded year.</question> [SQL]:
<SQL_QUERY>SELECT LOCATION FROM school ORDER BY Founded DESC</SQL_QUERY>
school_player
SELECT LOCATION FROM school ORDER BY Founded DESC
List the locations of schools in descending order of founded year.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the list of school locations sorted in descending order of school foundation year?</question> [SQL]:
<SQL_QUERY>SELECT LOCATION FROM school ORDER BY Founded DESC</SQL_QUERY>
school_player
SELECT LOCATION FROM school ORDER BY Founded DESC
What is the list of school locations sorted in descending order of school foundation year?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the enrollments of schools whose denomination is not "Catholic"?</question> [SQL]:
<SQL_QUERY>SELECT Enrollment FROM school WHERE Denomination != "Catholic"</SQL_QUERY>
school_player
SELECT Enrollment FROM school WHERE Denomination != "Catholic"
What are the enrollments of schools whose denomination is not "Catholic"?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the enrollment for each school that does not have "Catholic" as denomination.</question> [SQL]:
<SQL_QUERY>SELECT Enrollment FROM school WHERE Denomination != "Catholic"</SQL_QUERY>
school_player
SELECT Enrollment FROM school WHERE Denomination != "Catholic"
List the enrollment for each school that does not have "Catholic" as denomination.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the average enrollment of schools?</question> [SQL]:
<SQL_QUERY>SELECT avg(Enrollment) FROM school</SQL_QUERY>
school_player
SELECT avg(Enrollment) FROM school
What is the average enrollment of schools?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Take the average of the school enrollment.</question> [SQL]:
<SQL_QUERY>SELECT avg(Enrollment) FROM school</SQL_QUERY>
school_player
SELECT avg(Enrollment) FROM school
Take the average of the school enrollment.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the teams of the players, sorted in ascending alphabetical order?</question> [SQL]:
<SQL_QUERY>SELECT Team FROM player ORDER BY Team ASC</SQL_QUERY>
school_player
SELECT Team FROM player ORDER BY Team ASC
What are the teams of the players, sorted in ascending alphabetical order?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find the team of each player and sort them in ascending alphabetical order.</question> [SQL]:
<SQL_QUERY>SELECT Team FROM player ORDER BY Team ASC</SQL_QUERY>
school_player
SELECT Team FROM player ORDER BY Team ASC
Find the team of each player and sort them in ascending alphabetical order.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>How many different positions of players are there?</question> [SQL]:
<SQL_QUERY>SELECT count(DISTINCT POSITION) FROM player</SQL_QUERY>
school_player
SELECT count(DISTINCT POSITION) FROM player
How many different positions of players are there?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Count the number of distinct player positions.</question> [SQL]:
<SQL_QUERY>SELECT count(DISTINCT POSITION) FROM player</SQL_QUERY>
school_player
SELECT count(DISTINCT POSITION) FROM player
Count the number of distinct player positions.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find the team of the player of the highest age.</question> [SQL]:
<SQL_QUERY>SELECT Team FROM player ORDER BY Age DESC LIMIT 1</SQL_QUERY>
school_player
SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Find the team of the player of the highest age.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Which team has the oldest player?</question> [SQL]:
<SQL_QUERY>SELECT Team FROM player ORDER BY Age DESC LIMIT 1</SQL_QUERY>
school_player
SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Which team has the oldest player?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the teams of the players with the top 5 largest ages.</question> [SQL]:
<SQL_QUERY>SELECT Team FROM player ORDER BY Age DESC LIMIT 5</SQL_QUERY>
school_player
SELECT Team FROM player ORDER BY Age DESC LIMIT 5
List the teams of the players with the top 5 largest ages.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the teams that have the 5 oldest players?</question> [SQL]:
<SQL_QUERY>SELECT Team FROM player ORDER BY Age DESC LIMIT 5</SQL_QUERY>
school_player
SELECT Team FROM player ORDER BY Age DESC LIMIT 5
What are the teams that have the 5 oldest players?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>For each player, show the team and the location of school they belong to.</question> [SQL]:
<SQL_QUERY>SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID</SQL_QUERY>
school_player
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID
For each player, show the team and the location of school they belong to.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the team and the location of school each player belongs to?</question> [SQL]:
<SQL_QUERY>SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID</SQL_QUERY>
school_player
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID
What are the team and the location of school each player belongs to?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Show the locations of schools that have more than 1 player.</question> [SQL]:
<SQL_QUERY>SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1</SQL_QUERY>
school_player
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1
Show the locations of schools that have more than 1 player.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Which schools have more than 1 player? Give me the school locations.</question> [SQL]:
<SQL_QUERY>SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1</SQL_QUERY>
school_player
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1
Which schools have more than 1 player? Give me the school locations.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Show the denomination of the school that has the most players.</question> [SQL]:
<SQL_QUERY>SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>
school_player
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
Show the denomination of the school that has the most players.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the denomination of the school the most players belong to?</question> [SQL]:
<SQL_QUERY>SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>
school_player
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
What is the denomination of the school the most players belong to?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Show locations and nicknames of schools.</question> [SQL]:
<SQL_QUERY>SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID</SQL_QUERY>
school_player
SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID
Show locations and nicknames of schools.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the location and nickname of each school?</question> [SQL]:
<SQL_QUERY>SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID</SQL_QUERY>
school_player
SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID
What are the location and nickname of each school?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Please show different denominations and the corresponding number of schools.</question> [SQL]:
<SQL_QUERY>SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination</SQL_QUERY>
school_player
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination
Please show different denominations and the corresponding number of schools.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>For each denomination, return the denomination and the count of schools with that denomination.</question> [SQL]:
<SQL_QUERY>SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination</SQL_QUERY>
school_player
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination
For each denomination, return the denomination and the count of schools with that denomination.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Please show different denominations and the corresponding number of schools in descending order.</question> [SQL]:
<SQL_QUERY>SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC</SQL_QUERY>
school_player
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
Please show different denominations and the corresponding number of schools in descending order.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.</question> [SQL]:
<SQL_QUERY>SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC</SQL_QUERY>
school_player
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the school color of the school that has the largest enrollment.</question> [SQL]:
<SQL_QUERY>SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1</SQL_QUERY>
school_player
SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
List the school color of the school that has the largest enrollment.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the school color of the school with the largest enrollment?</question> [SQL]:
<SQL_QUERY>SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1</SQL_QUERY>
school_player
SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
What is the school color of the school with the largest enrollment?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the locations of schools that do not have any player.</question> [SQL]:
<SQL_QUERY>SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)</SQL_QUERY>
school_player
SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
List the locations of schools that do not have any player.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Which schools do not have any player? Give me the school locations.</question> [SQL]:
<SQL_QUERY>SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)</SQL_QUERY>
school_player
SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
Which schools do not have any player? Give me the school locations.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Show the denomination shared by schools founded before 1890 and schools founded after 1900</question> [SQL]:
<SQL_QUERY>SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900</SQL_QUERY>
school_player
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
Show the denomination shared by schools founded before 1890 and schools founded after 1900
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the denominations used by both schools founded before 1890 and schools founded after 1900?</question> [SQL]:
<SQL_QUERY>SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900</SQL_QUERY>
school_player
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
What are the denominations used by both schools founded before 1890 and schools founded after 1900?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Show the nicknames of schools that are not in division 1.</question> [SQL]:
<SQL_QUERY>SELECT Nickname FROM school_details WHERE Division != "Division 1"</SQL_QUERY>
school_player
SELECT Nickname FROM school_details WHERE Division != "Division 1"
Show the nicknames of schools that are not in division 1.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the nicknames of schools whose division is not 1?</question> [SQL]:
<SQL_QUERY>SELECT Nickname FROM school_details WHERE Division != "Division 1"</SQL_QUERY>
school_player
SELECT Nickname FROM school_details WHERE Division != "Division 1"
What are the nicknames of schools whose division is not 1?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Show the denomination shared by more than one school.</question> [SQL]:
<SQL_QUERY>SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1</SQL_QUERY>
school_player
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1
Show the denomination shared by more than one school.
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);</schema>" <primary_keys>[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id</primary_keys>" <foreign_keys>[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are the denomination more than one school have?</question> [SQL]:
<SQL_QUERY>SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1</SQL_QUERY>
school_player
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1
What are the denomination more than one school have?
[Schema (values) (types)]: | school_player | school : school_id (text) , school (number) , location (text) , enrollment (text) , founded (number) , denomination (number) , boys_or_girls (text) , day_or_boarding (text) , year_entered_competition (text) , school_colors (number) | school_details : school_id (text) , nickname (number) , colors (text) , league (text) , class (number) , division (number) | school_performance : school_id (text) , school_year (number) , class_a (text) , class_aa (text) | player : player_id (text) , player (number) , team (text) , age (text) , position (number) , school_id (number);
[Primary Keys]: school : school_id, school_details : school_id, school_performance : school_id, player : player_id
[Foreign Keys]: school_details : school_id = school : school_id | school_performance : school_id = school : school_id | player : school_id = school : school_id