Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many singers do we have?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM singer</SQL_QUERY>

Question: SELECT count(*) FROM singer

Question: How many singers do we have?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the total number of singers?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM singer</SQL_QUERY>

Question: SELECT count(*) FROM singer

Question: What is the total number of singers?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show name, country, age for all singers ordered by age from the oldest to the youngest.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  country ,  age FROM singer ORDER BY age DESC</SQL_QUERY>

Question: SELECT name ,  country ,  age FROM singer ORDER BY age DESC

Question: Show name, country, age for all singers ordered by age from the oldest to the youngest.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names, countries, and ages for every singer in descending order of age?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  country ,  age FROM singer ORDER BY age DESC</SQL_QUERY>

Question: SELECT name ,  country ,  age FROM singer ORDER BY age DESC

Question: What are the names, countries, and ages for every singer in descending order of age?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average, minimum, and maximum age of all singers from France?</question>
[SQL]:

Output: <SQL_QUERY>SELECT avg(age) ,  min(age) ,  max(age) FROM singer WHERE country  =  'France'</SQL_QUERY>

Question: SELECT avg(age) ,  min(age) ,  max(age) FROM singer WHERE country  =  'France'

Question: What is the average, minimum, and maximum age of all singers from France?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average, minimum, and maximum age for all French singers?</question>
[SQL]:

Output: <SQL_QUERY>SELECT avg(age) ,  min(age) ,  max(age) FROM singer WHERE country  =  'France'</SQL_QUERY>

Question: SELECT avg(age) ,  min(age) ,  max(age) FROM singer WHERE country  =  'France'

Question: What is the average, minimum, and maximum age for all French singers?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the name and the release year of the song by the youngest singer.</question>
[SQL]:

Output: <SQL_QUERY>SELECT song_name ,  song_release_year FROM singer ORDER BY age LIMIT 1</SQL_QUERY>

Question: SELECT song_name ,  song_release_year FROM singer ORDER BY age LIMIT 1

Question: Show the name and the release year of the song by the youngest singer.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and release years for all the songs of the youngest singer?</question>
[SQL]:

Output: <SQL_QUERY>SELECT song_name ,  song_release_year FROM singer ORDER BY age LIMIT 1</SQL_QUERY>

Question: SELECT song_name ,  song_release_year FROM singer ORDER BY age LIMIT 1

Question: What are the names and release years for all the songs of the youngest singer?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are all distinct countries where singers above age 20 are from?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT country FROM singer WHERE age  >  20</SQL_QUERY>

Question: SELECT DISTINCT country FROM singer WHERE age  >  20

Question: What are all distinct countries where singers above age 20 are from?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are  the different countries with singers above age 20?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT country FROM singer WHERE age  >  20</SQL_QUERY>

Question: SELECT DISTINCT country FROM singer WHERE age  >  20

Question: What are  the different countries with singers above age 20?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all countries and the number of singers in each country.</question>
[SQL]:

Output: <SQL_QUERY>SELECT country ,  count(*) FROM singer GROUP BY country</SQL_QUERY>

Question: SELECT country ,  count(*) FROM singer GROUP BY country

Question: Show all countries and the number of singers in each country.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many singers are from each country?</question>
[SQL]:

Output: <SQL_QUERY>SELECT country ,  count(*) FROM singer GROUP BY country</SQL_QUERY>

Question: SELECT country ,  count(*) FROM singer GROUP BY country

Question: How many singers are from each country?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all song names by singers above the average age.</question>
[SQL]:

Output: <SQL_QUERY>SELECT song_name FROM singer WHERE age  >  (SELECT avg(age) FROM singer)</SQL_QUERY>

Question: SELECT song_name FROM singer WHERE age  >  (SELECT avg(age) FROM singer)

Question: List all song names by singers above the average age.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are all the song names by singers who are older than average?</question>
[SQL]:

Output: <SQL_QUERY>SELECT song_name FROM singer WHERE age  >  (SELECT avg(age) FROM singer)</SQL_QUERY>

Question: SELECT song_name FROM singer WHERE age  >  (SELECT avg(age) FROM singer)

Question: What are all the song names by singers who are older than average?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show location and name for all stadiums with a capacity between 5000 and 10000.</question>
[SQL]:

Output: <SQL_QUERY>SELECT LOCATION ,  name FROM stadium WHERE capacity BETWEEN 5000 AND 10000</SQL_QUERY>

Question: SELECT LOCATION ,  name FROM stadium WHERE capacity BETWEEN 5000 AND 10000

Question: Show location and name for all stadiums with a capacity between 5000 and 10000.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the locations and names of all stations with capacity between 5000 and 10000?</question>
[SQL]:

Output: <SQL_QUERY>SELECT LOCATION ,  name FROM stadium WHERE capacity BETWEEN 5000 AND 10000</SQL_QUERY>

Question: SELECT LOCATION ,  name FROM stadium WHERE capacity BETWEEN 5000 AND 10000

Question: What are the locations and names of all stations with capacity between 5000 and 10000?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the maximum capacity and the average of all stadiums ?</question>
[SQL]:

Output: <SQL_QUERY>select max(capacity), average from stadium</SQL_QUERY>

Question: select max(capacity), average from stadium

Question: What is the maximum capacity and the average of all stadiums ?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average and maximum capacities for all stadiums ?</question>
[SQL]:

Output: <SQL_QUERY>select avg(capacity) ,  max(capacity) from stadium</SQL_QUERY>

Question: select avg(capacity) ,  max(capacity) from stadium

Question: What is the average and maximum capacities for all stadiums ?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name and capacity for the stadium with highest average attendance?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1</SQL_QUERY>

Question: SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1

Question: What is the name and capacity for the stadium with highest average attendance?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name and capacity for the stadium with the highest average attendance?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1</SQL_QUERY>

Question: SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1

Question: What is the name and capacity for the stadium with the highest average attendance?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many concerts are there in year 2014 or 2015?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM concert WHERE YEAR  =  2014 OR YEAR  =  2015</SQL_QUERY>

Question: SELECT count(*) FROM concert WHERE YEAR  =  2014 OR YEAR  =  2015

Question: How many concerts are there in year 2014 or 2015?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many concerts occurred in 2014 or 2015?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM concert WHERE YEAR  =  2014 OR YEAR  =  2015</SQL_QUERY>

Question: SELECT count(*) FROM concert WHERE YEAR  =  2014 OR YEAR  =  2015

Question: How many concerts occurred in 2014 or 2015?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the stadium name and the number of concerts in each stadium.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id GROUP BY T1.stadium_id</SQL_QUERY>

Question: SELECT T2.name ,  count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id GROUP BY T1.stadium_id

Question: Show the stadium name and the number of concerts in each stadium.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each stadium, how many concerts play there?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id GROUP BY T1.stadium_id</SQL_QUERY>

Question: SELECT T2.name ,  count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id GROUP BY T1.stadium_id

Question: For each stadium, how many concerts play there?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the stadium name and capacity with most number of concerts in year 2014 or after.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  >=  2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT T2.name ,  T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  >=  2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1

Question: Show the stadium name and capacity with most number of concerts in year 2014 or after.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name and capacity of the stadium with the most concerts after 2013 ?</question>
[SQL]:

Output: <SQL_QUERY>select t2.name ,  t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id  =  t2.stadium_id where t1.year  >  2013 group by t2.stadium_id order by count(*) desc limit 1</SQL_QUERY>

Question: select t2.name ,  t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id  =  t2.stadium_id where t1.year  >  2013 group by t2.stadium_id order by count(*) desc limit 1

Question: What is the name and capacity of the stadium with the most concerts after 2013 ?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which year has most number of concerts?</question>
[SQL]:

Output: <SQL_QUERY>SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1

Question: Which year has most number of concerts?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the year that had the most concerts?</question>
[SQL]:

Output: <SQL_QUERY>SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1

Question: What is the year that had the most concerts?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the stadium names without any concert.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)</SQL_QUERY>

Question: SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)

Question: Show the stadium names without any concert.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the stadiums without any concerts?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)</SQL_QUERY>

Question: SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)

Question: What are the names of the stadiums without any concerts?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show countries where a singer above age 40 and a singer below 30 are from.</question>
[SQL]:

Output: <SQL_QUERY>SELECT country FROM singer WHERE age  >  40 INTERSECT SELECT country FROM singer WHERE age  <  30</SQL_QUERY>

Question: SELECT country FROM singer WHERE age  >  40 INTERSECT SELECT country FROM singer WHERE age  <  30

Question: Show countries where a singer above age 40 and a singer below 30 are from.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show names for all stadiums except for stadiums having a concert in year 2014.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  =  2014</SQL_QUERY>

Question: SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  =  2014

Question: Show names for all stadiums except for stadiums having a concert in year 2014.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all stadiums that did not have a concert in 2014?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  =  2014</SQL_QUERY>

Question: SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  =  2014

Question: What are the names of all stadiums that did not have a concert in 2014?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the name and theme for all concerts and the number of singers in each concert.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.concert_name ,  T2.theme ,  count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id  =  T2.concert_id GROUP BY T2.concert_id</SQL_QUERY>

Question: SELECT T2.concert_name ,  T2.theme ,  count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id  =  T2.concert_id GROUP BY T2.concert_id

Question: Show the name and theme for all concerts and the number of singers in each concert.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names , themes , and number of singers for every concert ?</question>
[SQL]:

Output: <SQL_QUERY>select t2.concert_name ,  t2.theme ,  count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id  =  t2.concert_id group by t2.concert_id</SQL_QUERY>

Question: select t2.concert_name ,  t2.theme ,  count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id  =  t2.concert_id group by t2.concert_id

Question: What are the names , themes , and number of singers for every concert ?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List singer names and number of concerts for each singer.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id GROUP BY T2.singer_id</SQL_QUERY>

Question: SELECT T2.name ,  count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id GROUP BY T2.singer_id

Question: List singer names and number of concerts for each singer.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the singers and number of concerts for each person?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id GROUP BY T2.singer_id</SQL_QUERY>

Question: SELECT T2.name ,  count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id GROUP BY T2.singer_id

Question: What are the names of the singers and number of concerts for each person?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all singer names in concerts in year 2014.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id JOIN concert AS T3 ON T1.concert_id  =  T3.concert_id WHERE T3.year  =  2014</SQL_QUERY>

Question: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id JOIN concert AS T3 ON T1.concert_id  =  T3.concert_id WHERE T3.year  =  2014

Question: List all singer names in concerts in year 2014.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the singers who performed in a concert in 2014?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id JOIN concert AS T3 ON T1.concert_id  =  T3.concert_id WHERE T3.year  =  2014</SQL_QUERY>

Question: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id JOIN concert AS T3 ON T1.concert_id  =  T3.concert_id WHERE T3.year  =  2014

Question: What are the names of the singers who performed in a concert in 2014?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>what is the name and nation of the singer who have a song having 'Hey' in its name?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'</SQL_QUERY>

Question: SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'

Question: what is the name and nation of the singer who have a song having 'Hey' in its name?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'</SQL_QUERY>

Question: SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'

Question: What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2014 INTERSECT SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2015</SQL_QUERY>

Question: SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2014 INTERSECT SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2015

Question: Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2014 INTERSECT SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2015</SQL_QUERY>

Question: SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2014 INTERSECT SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2015

Question: What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of concerts happened in the stadium with the highest capacity .</question>
[SQL]:

Output: <SQL_QUERY>select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)</SQL_QUERY>

Question: select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)

Question: Find the number of concerts happened in the stadium with the highest capacity .


Input:
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)]: | concert_singer |  stadium : stadium_id (text) , location (number) , name (text) , capacity (text) , highest (number) , lowest (number) , average (number) | singer : singer_id (text) , name (number) , country (text) , song_name (text) , song_release_year (number) , age (number) , is_male (number) | concert : concert_id (text) , concert_name (number) , theme (text) , stadium_id (text) , year (number) | singer_in_concert : concert_id (text) , singer_id (number);</schema>"
<primary_keys>[Primary Keys]: stadium : stadium_id, singer : singer_id, concert : concert_id, singer_in_concert : concert_id</primary_keys>"
<foreign_keys>[Foreign Keys]: concert : stadium_id = stadium : stadium_id | singer_in_concert : singer_id = singer : singer_id | singer_in_concert : concert_id = concert : concert_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the number of concerts that occurred in the stadium with the largest capacity ?</question>
[SQL]:

Output: <SQL_QUERY>select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)</SQL_QUERY>

Question: select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)

Question: What are the number of concerts that occurred in the stadium with the largest capacity ?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of pets whose weight is heavier than 10.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM pets WHERE weight  >  10</SQL_QUERY>

Question: SELECT count(*) FROM pets WHERE weight  >  10

Question: Find the number of pets whose weight is heavier than 10.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many pets have a greater weight than 10?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM pets WHERE weight  >  10</SQL_QUERY>

Question: SELECT count(*) FROM pets WHERE weight  >  10

Question: How many pets have a greater weight than 10?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the weight of the youngest dog.</question>
[SQL]:

Output: <SQL_QUERY>SELECT weight FROM pets ORDER BY pet_age LIMIT 1</SQL_QUERY>

Question: SELECT weight FROM pets ORDER BY pet_age LIMIT 1

Question: Find the weight of the youngest dog.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How much does the youngest dog weigh?</question>
[SQL]:

Output: <SQL_QUERY>SELECT weight FROM pets ORDER BY pet_age LIMIT 1</SQL_QUERY>

Question: SELECT weight FROM pets ORDER BY pet_age LIMIT 1

Question: How much does the youngest dog weigh?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the maximum weight for each type of pet. List the maximum weight and pet type.</question>
[SQL]:

Output: <SQL_QUERY>SELECT max(weight) ,  petType FROM pets GROUP BY petType</SQL_QUERY>

Question: SELECT max(weight) ,  petType FROM pets GROUP BY petType

Question: Find the maximum weight for each type of pet. List the maximum weight and pet type.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the maximum weight and type for each type of pet.</question>
[SQL]:

Output: <SQL_QUERY>SELECT max(weight) ,  petType FROM pets GROUP BY petType</SQL_QUERY>

Question: SELECT max(weight) ,  petType FROM pets GROUP BY petType

Question: List the maximum weight and type for each type of pet.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find number of pets owned by students who are older than 20.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20</SQL_QUERY>

Question: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20

Question: Find number of pets owned by students who are older than 20.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many pets are owned by students that have an age greater than 20?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20</SQL_QUERY>

Question: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20

Question: How many pets are owned by students that have an age greater than 20?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of dog pets that are raised by female students (with sex F).</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'</SQL_QUERY>

Question: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'

Question: Find the number of dog pets that are raised by female students (with sex F).


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many dog pets are raised by female students?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'</SQL_QUERY>

Question: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'

Question: How many dog pets are raised by female students?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of distinct type of pets.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT pettype) FROM pets</SQL_QUERY>

Question: SELECT count(DISTINCT pettype) FROM pets

Question: Find the number of distinct type of pets.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many different types of pet are there?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT pettype) FROM pets</SQL_QUERY>

Question: SELECT count(DISTINCT pettype) FROM pets

Question: How many different types of pet are there?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first name of students who have cat or dog pet.</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' OR T3.pettype  =  'dog'</SQL_QUERY>

Question: SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' OR T3.pettype  =  'dog'

Question: Find the first name of students who have cat or dog pet.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first names of every student who has a cat or dog as a pet?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' OR T3.pettype  =  'dog'</SQL_QUERY>

Question: SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' OR T3.pettype  =  'dog'

Question: What are the first names of every student who has a cat or dog as a pet?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first name of students who have both cat and dog pets .</question>
[SQL]:

Output: <SQL_QUERY>select t1.fname from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid join pets as t3 on t3.petid  =  t2.petid where t3.pettype  =  'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid join pets as t3 on t3.petid  =  t2.petid where t3.pettype  =  'dog'</SQL_QUERY>

Question: select t1.fname from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid join pets as t3 on t3.petid  =  t2.petid where t3.pettype  =  'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid join pets as t3 on t3.petid  =  t2.petid where t3.pettype  =  'dog'

Question: Find the first name of students who have both cat and dog pets .


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the students' first names who have both cats and dogs as pets?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog'</SQL_QUERY>

Question: SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog'

Question: What are the students' first names who have both cats and dogs as pets?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the major and age of students who do not have a cat pet.</question>
[SQL]:

Output: <SQL_QUERY>SELECT major ,  age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')</SQL_QUERY>

Question: SELECT major ,  age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')

Question: Find the major and age of students who do not have a cat pet.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What major is every student who does not own a cat as a pet, and also how old are they?</question>
[SQL]:

Output: <SQL_QUERY>SELECT major ,  age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')</SQL_QUERY>

Question: SELECT major ,  age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')

Question: What major is every student who does not own a cat as a pet, and also how old are they?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the id of students who do not have a cat pet.</question>
[SQL]:

Output: <SQL_QUERY>SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'</SQL_QUERY>

Question: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'

Question: Find the id of students who do not have a cat pet.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids of the students who do not own cats as pets?</question>
[SQL]:

Output: <SQL_QUERY>SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'</SQL_QUERY>

Question: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'

Question: What are the ids of the students who do not own cats as pets?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first name and age of students who have a dog but do not have a cat as a pet.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')</SQL_QUERY>

Question: SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')

Question: Find the first name and age of students who have a dog but do not have a cat as a pet.


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the first name of every student who has a dog but does not have a cat?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')</SQL_QUERY>

Question: SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')

Question: What is the first name of every student who has a dog but does not have a cat?


Input:
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)]: | pets_1 |  Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Has_Pet : stuid (text) , petid (number) | Pets : petid (text) , pettype (number) , pet_age (text) , weight (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid, has_pet : petid</primary_keys>"
<foreign_keys>[Foreign Keys]: has_pet : stuid = student : stuid | has_pet : petid = pets : petid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the type and weight of the youngest pet.</question>
[SQL]:

Output: <SQL_QUERY>SELECT pettype ,  weight FROM pets ORDER BY pet_age LIMIT 1</SQL_QUERY>

Question: SELECT pettype ,  weight FROM pets ORDER BY pet_age LIMIT 1

Question: Find the type and weight of the youngest pet.