db_id
stringclasses 20
values | question
stringlengths 18
174
| db_info
stringclasses 20
values | ground_truth
stringlengths 20
474
|
---|---|---|---|
concert_singer | 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
| select count ( * ) from singer |
concert_singer | 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
| select count ( * ) from singer |
concert_singer | 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
| select name , country , age from singer order by age desc |
concert_singer | 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
| select name , country , age from singer order by age desc |
concert_singer | 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
| select avg ( age ) , min ( age ) , max ( age ) from singer where country = 'France' |
concert_singer | 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
| select avg ( age ) , min ( age ) , max ( age ) from singer where country = 'France' |
concert_singer | 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
| select song_name , song_release_year from singer order by age asc limit 1 |
concert_singer | 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
| select song_name , song_release_year from singer order by age asc limit 1 |
concert_singer | 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
| select distinct country from singer where age > 20 |
concert_singer | 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
| select distinct country from singer where age > 20 |
concert_singer | 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
| select country , count ( * ) from singer group by country |
concert_singer | 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
| select country , count ( * ) from singer group by country |
concert_singer | 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
| select song_name from singer where age > ( select avg ( age ) from singer ) |
concert_singer | 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
| select song_name from singer where age > ( select avg ( age ) from singer ) |
concert_singer | 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
| select location , name from stadium where capacity between 5000 and 10000 |
concert_singer | 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
| select location , name from stadium where capacity between 5000 and 10000 |
concert_singer | 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
| select max ( capacity ) , average from stadium |
concert_singer | 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
| select avg ( capacity ) , max ( capacity ) from stadium |
concert_singer | 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
| select name , capacity from stadium order by average desc limit 1 |
concert_singer | 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
| select name , capacity from stadium order by average desc limit 1 |
concert_singer | 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
| select count ( * ) from concert where year = 2014 or year = 2015 |
concert_singer | 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
| select count ( * ) from concert where year = 2014 or year = 2015 |
concert_singer | 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
| select stadium.name , count ( * ) from concert join stadium on concert.stadium_id = stadium.stadium_id group by concert.stadium_id |
concert_singer | 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
| select stadium.name , count ( * ) from concert join stadium on concert.stadium_id = stadium.stadium_id group by concert.stadium_id |
concert_singer | 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
| select stadium.name , stadium.capacity from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year >= 2014 group by stadium.stadium_id order by count ( * ) desc limit 1 |
concert_singer | 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
| select stadium.name , stadium.capacity from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year > 2013 group by stadium.stadium_id order by count ( * ) desc limit 1 |
concert_singer | 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
| select year from concert group by year order by count ( * ) desc limit 1 |
concert_singer | 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
| select year from concert group by year order by count ( * ) desc limit 1 |
concert_singer | 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
| select name from stadium where stadium_id not in ( select stadium_id from concert ) |
concert_singer | 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
| select name from stadium where stadium_id not in ( select stadium_id from concert ) |
concert_singer | 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
| select country from singer where age > 40 intersect select country from singer where age < 30 |
concert_singer | 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
| select name from stadium except select stadium.name from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014 |
concert_singer | 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
| select name from stadium except select stadium.name from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014 |
concert_singer | 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
| select concert.concert_name , concert.theme , count ( * ) from singer_in_concert join concert on singer_in_concert.concert_id = concert.concert_id group by concert.concert_id |
concert_singer | 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
| select concert.concert_name , concert.theme , count ( * ) from singer_in_concert join concert on singer_in_concert.concert_id = concert.concert_id group by concert.concert_id |
concert_singer | 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
| select singer.name , count ( * ) from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id group by singer.singer_id |
concert_singer | 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
| select singer.name , count ( * ) from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id group by singer.singer_id |
concert_singer | 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
| select singer.name from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id join concert on singer_in_concert.concert_id = concert.concert_id where concert.year = 2014 |
concert_singer | 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
| select singer.name from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id join concert on singer_in_concert.concert_id = concert.concert_id where concert.year = 2014 |
concert_singer | 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
| select name , country from singer where song_name like '%Hey%' |
concert_singer | 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
| select name , country from singer where song_name like '%Hey%' |
concert_singer | 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
| select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014 intersect select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2015 |
concert_singer | 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
| select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2014 intersect select stadium.name , stadium.location from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year = 2015 |
concert_singer | 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
| select count ( * ) from concert where stadium_id = ( select stadium_id from stadium order by capacity desc limit 1 ) |
concert_singer | 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
| select count ( * ) from concert where stadium_id = ( select stadium_id from stadium order by capacity desc limit 1 ) |
pets_1 | 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
| select count ( * ) from pets where weight > 10 |
pets_1 | 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
| select count ( * ) from pets where weight > 10 |
pets_1 | 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
| select weight from pets order by pet_age asc limit 1 |
pets_1 | 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
| select weight from pets order by pet_age asc limit 1 |
pets_1 | 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
| select max ( weight ) , pettype from pets group by pettype |
pets_1 | 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
| select max ( weight ) , pettype from pets group by pettype |
pets_1 | 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
| select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20 |
pets_1 | 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
| select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20 |
pets_1 | 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
| select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog' |
pets_1 | 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
| select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog' |
pets_1 | 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
| select count ( distinct pettype ) from pets |
pets_1 | 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
| select count ( distinct pettype ) from pets |
pets_1 | 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
| select distinct student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' or pets.pettype = 'dog' |
pets_1 | 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
| select distinct student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' or pets.pettype = 'dog' |
pets_1 | 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
| select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' |
pets_1 | 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
| select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' |
pets_1 | 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
| select major , age from student where stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' ) |
pets_1 | 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
| select major , age from student where stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' ) |
pets_1 | 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
| select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' |
pets_1 | 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
| select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' |
pets_1 | 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
| select student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' ) |
pets_1 | 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
| select student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' ) |
pets_1 | 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
| select pettype , weight from pets order by pet_age asc limit 1 |
pets_1 | 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
| select pettype , weight from pets order by pet_age asc limit 1 |
pets_1 | 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
| select petid , weight from pets where pet_age > 1 |
pets_1 | 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
| select petid , weight from pets where pet_age > 1 |
pets_1 | 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
| select avg ( pet_age ) , max ( pet_age ) , pettype from pets group by pettype |
pets_1 | 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
| select avg ( pet_age ) , max ( pet_age ) , pettype from pets group by pettype |
pets_1 | 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
| select avg ( weight ) , pettype from pets group by pettype |
pets_1 | 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
| select avg ( weight ) , pettype from pets group by pettype |
pets_1 | 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
| select distinct student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid |
pets_1 | 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
| select distinct student.fname , student.age from student join has_pet on student.stuid = has_pet.stuid |
pets_1 | 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
| select has_pet.petid from student join has_pet on student.stuid = has_pet.stuid where student.lname = 'Smith' |
pets_1 | 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
| select has_pet.petid from student join has_pet on student.stuid = has_pet.stuid where student.lname = 'Smith' |
pets_1 | 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
| select count ( * ) , student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid |
pets_1 | 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
| select count ( * ) , student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid |
pets_1 | 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
| select student.fname , student.sex from student join has_pet on student.stuid = has_pet.stuid group by student.stuid having count ( * ) > 1 |
pets_1 | 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
| select student.fname , student.sex from student join has_pet on student.stuid = has_pet.stuid group by student.stuid having count ( * ) > 1 |
pets_1 | 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
| select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat' |
pets_1 | 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
| select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat' |
pets_1 | 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
| select avg ( age ) from student where stuid not in ( select stuid from has_pet ) |
pets_1 | 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
| select avg ( age ) from student where stuid not in ( select stuid from has_pet ) |
car_1 | 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
| select count ( * ) from continents |
car_1 | 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
| select count ( * ) from continents |
car_1 | 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
| select continents.contid , continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent group by continents.contid |
car_1 | 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
| select continents.contid , continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent group by continents.contid |
car_1 | 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
| select count ( * ) from countries |
car_1 | 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
| select count ( * ) from countries |
car_1 | 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
| select car_makers.fullname , car_makers.id , count ( * ) from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id |
car_1 | 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
| select car_makers.fullname , car_makers.id , count ( * ) from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id |
car_1 | 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
| select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.horsepower asc limit 1 |
car_1 | 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
| select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.horsepower asc limit 1 |
car_1 | 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
| select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.weight < ( select avg ( weight ) from cars_data ) |
car_1 | 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
| select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.weight < ( select avg ( weight ) from cars_data ) |
car_1 | 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
| select distinct car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year = '1970' |
End of preview. Expand
in Dataset Viewer.
Dataset Card for Spider 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 spider-fine-tuned LLMs with database context.
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}
}
- Downloads last month
- 67