db_id
stringclasses
20 values
prompt
stringlengths
424
2.17k
ground_truth
stringlengths
27
254
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many singers do we have? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select count ( singer.* ) from singer
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the total number of singers? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select count ( singer.* ) from singer
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show name, country, age for all singers ordered by age from the oldest to the youngest. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name , singer.Country , singer.Age from singer order by singer.Age desc
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names, countries, and ages for every singer in descending order of age? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name , singer.Country , singer.Age from singer order by singer.Age desc
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the average, minimum, and maximum age of all singers from France? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select avg ( singer.Age ) , min ( singer.Age ) , max ( singer.Age ) from singer where singer.Country = "France"
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the average, minimum, and maximum age for all French singers? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select avg ( singer.Age ) , min ( singer.Age ) , max ( singer.Age ) from singer where singer.Country = "France"
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show the name and the release year of the song by the youngest singer. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Song_Name , singer.Song_release_year from singer order by singer.Age asc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names and release years for all the songs of the youngest singer? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Song_Name , singer.Song_release_year from singer order by singer.Age asc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are all distinct countries where singers above age 20 are from? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select distinct singer.Country from singer where singer.Age > 20
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the different countries with singers above age 20? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select distinct singer.Country from singer where singer.Age > 20
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show all countries and the number of singers in each country. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Country , count ( singer.* ) from singer group by singer.Country
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many singers are from each country? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Country , count ( singer.* ) from singer group by singer.Country
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: List all song names by singers above the average age. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Song_Name from singer where @.@ > avg ( singer.Age )
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are all the song names by singers who are older than average? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Song_Name from singer where @.@ > avg ( singer.Age )
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show location and name for all stadiums with a capacity between 5000 and 10000. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Location , stadium.Name from stadium where stadium.Capacity between 5000 and 10000
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the locations and names of all stations with capacity between 5000 and 10000? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Location , stadium.Name from stadium where stadium.Capacity between 5000 and 10000
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the maximum capacity and the average of all stadiums ? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select max ( stadium.Capacity ) , stadium.average from stadium
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the average and maximum capacities for all stadiums ? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select avg ( stadium.Capacity ) , max ( stadium.Capacity ) from stadium
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the name and capacity for the stadium with highest average attendance? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , stadium.Capacity from stadium order by stadium.Average desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the name and capacity for the stadium with the highest average attendance? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , stadium.Capacity from stadium order by stadium.Average desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many concerts are there in year 2014 or 2015? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select count ( concert.* ) from concert where concert.Year = 2014 or concert.Year = 2015
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many concerts occurred in 2014 or 2015? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select count ( concert.* ) from concert where concert.Year = 2014 or concert.Year = 2015
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show the stadium name and the number of concerts in each stadium. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , count ( concert.* ) from concert group by concert.Stadium_ID
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: For each stadium, how many concerts play there? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , count ( concert.* ) from concert group by concert.Stadium_ID
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show the stadium name and capacity with most number of concerts in year 2014 or after. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , stadium.Capacity from concert where concert.Year >= 2014 group by stadium.Stadium_ID order by count ( concert.* ) desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the name and capacity of the stadium with the most concerts after 2013 ? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , stadium.Capacity from concert where concert.Year > 2013 group by stadium.Stadium_ID order by count ( concert.* ) desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Which year has most number of concerts? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select concert.Year from concert group by concert.Year order by count ( concert.* ) desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the year that had the most concerts? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select concert.Year from concert group by concert.Year order by count ( concert.* ) desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show the stadium names without any concert. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name from stadium where @.@ not in concert.*
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names of the stadiums without any concerts? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name from stadium where @.@ not in concert.*
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show countries where a singer above age 40 and a singer below 30 are from. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Country from singer where singer.Age > 40 and singer.Age < 30
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show names for all stadiums except for stadiums having a concert in year 2014. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name from stadium where except_ @.@ is stadium.* and concert.Year = 2014
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names of all stadiums that did not have a concert in 2014? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name from stadium where except_ @.@ is stadium.* and concert.Year = 2014
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Show the name and theme for all concerts and the number of singers in each concert. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select concert.concert_Name , concert.Theme , count ( singer_in_concert.* ) from singer_in_concert group by concert.concert_ID
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names , themes , and number of singers for every concert ? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select concert.concert_Name , concert.Theme , count ( singer_in_concert.* ) from singer_in_concert group by concert.concert_ID
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: List singer names and number of concerts for each singer. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name , count ( singer_in_concert.* ) from singer_in_concert group by singer.Singer_ID
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names of the singers and number of concerts for each person? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name , count ( singer_in_concert.* ) from singer_in_concert group by singer.Singer_ID
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: List all singer names in concerts in year 2014. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name from singer where concert.Year = 2014
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names of the singers who performed in a concert in 2014? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name from singer where concert.Year = 2014
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: what is the name and nation of the singer who have a song having 'Hey' in its name? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name , singer.Country from singer where singer.Song_Name like "%Hey%"
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the name and country of origin of every singer who has a song with the word 'Hey' in its title? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select singer.Name , singer.Country from singer where singer.Song_Name like "%Hey%"
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015. | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , stadium.Location from stadium where concert.Year = 2014 and concert.Year = 2015
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select stadium.Name , stadium.Location from stadium where concert.Year = 2014 and concert.Year = 2015
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the number of concerts happened in the stadium with the highest capacity . | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select count ( concert.* ) from concert order by stadium.Capacity desc limit 1
concert_singer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the number of concerts that occurred in the stadium with the largest capacity ? | stadium : stadium_id , location , name , capacity , highest , lowest , average | singer : singer_id , name , country , song_name , song_release_year , age , is_male | concert : concert_id , concert_name , theme , stadium_id , year | singer_in_concert : concert_id , singer_id | concert.stadium_id = stadium.stadium_id | singer_in_concert.singer_id = singer.singer_id | singer_in_concert.concert_id = concert.concert_id | ### Response:
select count ( concert.* ) from concert order by stadium.Capacity desc limit 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the number of pets whose weight is heavier than 10. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( pets.* ) from pets where pets.weight > 10
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many pets have a greater weight than 10? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( pets.* ) from pets where pets.weight > 10
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the weight of the youngest dog. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select pets.weight from pets order by pets.pet_age asc limit 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How much does the youngest dog weigh? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select pets.weight from pets order by pets.pet_age asc limit 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the maximum weight for each type of pet. List the maximum weight and pet type. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select max ( pets.weight ) , pets.PetType from pets group by pets.PetType
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: List the maximum weight and type for each type of pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select max ( pets.weight ) , pets.PetType from pets group by pets.PetType
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find number of pets owned by students who are older than 20. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( has_pet.* ) from has_pet where student.Age > 20
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many pets are owned by students that have an age greater than 20? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( has_pet.* ) from has_pet where student.Age > 20
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the number of dog pets that are raised by female students (with sex F). | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( pets.* ) from pets where student.Sex = "F" and pets.PetType = "dog"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many dog pets are raised by female students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( pets.* ) from pets where student.Sex = "F" and pets.PetType = "dog"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the number of distinct type of pets. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( distinct pets.PetType ) from pets
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many different types of pet are there? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( distinct pets.PetType ) from pets
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the first name of students who have cat or dog pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select distinct student.Fname from student where pets.PetType = "cat" or pets.PetType = "dog"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the first names of every student who has a cat or dog as a pet? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select distinct student.Fname from student where pets.PetType = "cat" or pets.PetType = "dog"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the first name of students who have both cat and dog pets . | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Fname from student where pets.PetType = "cat" and pets.PetType = "dog"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the students' first names who have both cats and dogs as pets? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Fname from student where pets.PetType = "cat" and pets.PetType = "dog"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the major and age of students who do not have a cat pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Major , student.Age from student where @.@ not in student.* and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What major is every student who does not own a cat as a pet, and also how old are they? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Major , student.Age from student where @.@ not in student.* and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the id of students who do not have a cat pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.StuID from student where except_ @.@ is pets.* and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the ids of the students who do not own cats as pets? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.StuID from student where except_ @.@ is pets.* and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the first name and age of students who have a dog but do not have a cat as a pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Fname , student.Age from student where pets.PetType = "dog" and @.@ not in student.* and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the first name of every student who has a dog but does not have a cat? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Fname , student.Age from student where pets.PetType = "dog" and @.@ not in student.* and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the type and weight of the youngest pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select pets.PetType , pets.weight from pets order by pets.pet_age asc limit 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What type of pet is the youngest animal, and how much does it weigh? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select pets.PetType , pets.weight from pets order by pets.pet_age asc limit 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the id and weight of all pets whose age is older than 1. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select pets.PetID , pets.weight from pets where pets.pet_age > 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the id and weight of every pet who is older than 1? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select pets.PetID , pets.weight from pets where pets.pet_age > 1
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the average and maximum age for each type of pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select avg ( pets.pet_age ) , max ( pets.pet_age ) , pets.PetType from pets group by pets.PetType
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the average and maximum age for each pet type? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select avg ( pets.pet_age ) , max ( pets.pet_age ) , pets.PetType from pets group by pets.PetType
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the average weight for each pet type. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select avg ( pets.weight ) , pets.PetType from pets group by pets.PetType
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the average weight for each type of pet? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select avg ( pets.weight ) , pets.PetType from pets group by pets.PetType
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the first name and age of students who have a pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select distinct student.Fname , student.Age from student where @.@ join has_pet.*
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What are the different first names and ages of the students who do have pets? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select distinct student.Fname , student.Age from student where @.@ join has_pet.*
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the id of the pet owned by student whose last name is 'Smith'. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select has_pet.PetID from has_pet where student.LName = "Smith"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the id of the pet owned by the student whose last name is 'Smith'? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select has_pet.PetID from has_pet where student.LName = "Smith"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the number of pets for each student who has any pet and student id. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( has_pet.* ) , student.StuID from student group by student.StuID
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: For students who have pets , how many pets does each student have ? list their ids instead of names . | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select count ( has_pet.* ) , student.StuID from student group by student.StuID
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the first name and gender of student who have more than one pet. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Fname , student.Sex from student where count ( has_pet.* ) > 1 group by student.StuID
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the first name and gender of the all the students who have more than one pet? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.Fname , student.Sex from has_pet where count ( has_pet.* ) > 1 group by student.StuID
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the last name of the student who has a cat that is age 3. | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.LName from student where pets.pet_age = 3 and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the last name of the student who has a cat that is 3 years old? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select student.LName from student where pets.pet_age = 3 and pets.PetType = "cat"
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the average age of students who do not have any pet . | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select avg ( student.Age ) from student where @.@ not in has_pet.*
pets_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the average age for all students who do not own any pets ? | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_pet : stuid , petid | pets : petid , pettype , pet_age , weight | has_pet.stuid = student.stuid | has_pet.petid = pets.petid | ### Response:
select avg ( student.Age ) from student where @.@ not in has_pet.*
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many continents are there? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select count ( continents.* ) from continents
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the number of continents? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select count ( continents.* ) from continents
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many countries does each continent have? List the continent id, continent name and the number of countries. | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select continents.ContId , continents.Continent , count ( countries.* ) from countries group by continents.ContId
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: For each continent, list its id, name, and how many countries it has? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select continents.ContId , continents.Continent , count ( countries.* ) from countries group by continents.ContId
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many countries are listed? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select count ( countries.* ) from countries
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many countries exist? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select count ( countries.* ) from countries
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: How many models does each car maker produce? List maker full name, id and the number. | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select car_makers.FullName , car_makers.Id , count ( model_list.* ) from car_makers group by car_makers.Id
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the full name of each car maker, along with its id and how many models it produces? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select car_makers.FullName , car_makers.Id , count ( model_list.* ) from car_makers group by car_makers.Id
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Which model of the car has the minimum horsepower? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select car_names.Model from car_names order by cars_data.Horsepower asc limit 1
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the model of the car with the smallest amount of horsepower? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select car_names.Model from car_names order by cars_data.Horsepower asc limit 1
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the model of the car whose weight is below the average weight. | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select car_names.Model from car_names where @.@ < avg ( cars_data.Weight )
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: What is the model for the car with a weight smaller than the average? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select car_names.Model from car_names where @.@ < avg ( cars_data.Weight )
car_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to NatSQL: Find the name of the makers that produced some cars in the year of 1970? | continents : contid , continent | countries : countryid , countryname , continent | car_makers : id , maker , fullname , country | model_list : modelid , maker , model | car_names : makeid , model , make | cars_data : id , mpg , cylinders , edispl , horsepower , weight , accelerate , year | countries.continent = continents.contid | car_makers.country = countries.countryid | model_list.maker = car_makers.id | car_names.model = model_list.model | cars_data.id = car_names.makeid | ### Response:
select distinct car_makers.Maker from car_makers where cars_data.Year = "1970"

Dataset Card for Spider NatSQL Context Validation

Dataset Summary

Spider is a large-scale complex and cross-domain semantic parsing and text-to-SQL dataset annotated by 11 Yale students The goal of the Spider challenge is to develop natural language interfaces to cross-domain databases.

This dataset was created to validate LLMs on the Spider dev dataset with database context using NatSQL.

NatSQL

NatSQL is an intermediate representation for SQL that simplifies the queries and reduces the mismatch between natural language and SQL. NatSQL preserves the core functionalities of SQL, but removes some clauses and keywords that are hard to infer from natural language descriptions. NatSQL also makes schema linking easier by reducing the number of schema items to predict. NatSQL can be easily converted to executable SQL queries and can improve the performance of text-to-SQL models.

Yale Lily Spider Leaderboards

The leaderboard can be seen at https://yale-lily.github.io/spider

Languages

The text in the dataset is in English.

Licensing Information

The spider dataset is licensed under the CC BY-SA 4.0

Citation

@article{yu2018spider,
  title={Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
  author={Yu, Tao and Zhang, Rui and Yang, Kai and Yasunaga, Michihiro and Wang, Dongxu and Li, Zifan and Ma, James and Li, Irene and Yao, Qingning and Roman, Shanelle and others},
  journal={arXiv preprint arXiv:1809.08887},
  year={2018}
}
@inproceedings{gan-etal-2021-natural-sql,
    title = "Natural {SQL}: Making {SQL} Easier to Infer from Natural Language Specifications",
    author = "Gan, Yujian  and
      Chen, Xinyun  and
      Xie, Jinxia  and
      Purver, Matthew  and
      Woodward, John R.  and
      Drake, John  and
      Zhang, Qiaofu",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021",
    month = nov,
    year = "2021",
    address = "Punta Cana, Dominican Republic",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.findings-emnlp.174",
    doi = "10.18653/v1/2021.findings-emnlp.174",
    pages = "2030--2042",
}
Downloads last month
1
Edit dataset card