richardr1126/spider-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: List ids for all student who are on scholarship. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from sportsinfo where onscholarship = 'Y'

### Instruction:

Convert text to sql: What are the ids for all sporty students who are on scholarship? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from sportsinfo where onscholarship = 'Y'

### Instruction:

Convert text to sql: Show last names for all student who are on scholarship. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid where sportsinfo.onscholarship = 'Y'

### Instruction:

Convert text to sql: What are the last names for all scholarship students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid where sportsinfo.onscholarship = 'Y'

### Instruction:

Convert text to sql: How many games are played for all students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( gamesplayed ) from sportsinfo
### Instruction:

Convert text to sql: What is the total number of games played? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( gamesplayed ) from sportsinfo

### Instruction:

Convert text to sql: How many games are played for all football games by students on scholarship? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( gamesplayed ) from sportsinfo where sportname = 'Football' and onscholarship = 'Y'

### Instruction:

Convert text to sql: What is the total number of all football games played by scholarship students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( gamesplayed ) from sportsinfo where sportname = 'Football' and onscholarship = 'Y'

### Instruction:

Convert text to sql: Show all sport name and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sportname , count ( * ) from sportsinfo group by sportname

### Instruction:

Convert text to sql: How many students play each sport? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sportname , count ( * ) from sportsinfo group by sportname
### Instruction:

Convert text to sql: Show all student IDs with the number of sports and total number of games played | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid , count ( * ) , sum ( gamesplayed ) from sportsinfo group by stuid

### Instruction:

Convert text to sql: What are the ids of all students along with how many sports and games did they play? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid , count ( * ) , sum ( gamesplayed ) from sportsinfo group by stuid

### Instruction:

Convert text to sql: Show all student IDs with more than total 10 hours per week on all sports played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from sportsinfo group by stuid having sum ( hoursperweek ) > 10

### Instruction:

Convert text to sql: What are the student IDs for everybody who worked for more than 10 hours per week on all sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from sportsinfo group by stuid having sum ( hoursperweek ) > 10

### Instruction:

Convert text to sql: What is the first name and last name of the student who have most number of sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select student.fname , student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid group by sportsinfo.stuid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the first and last name of the student who played the most sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select student.fname , student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid group by sportsinfo.stuid order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Which sport has most number of students on scholarship? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sportname from sportsinfo where onscholarship = 'Y' group by sportname order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the sport with the most scholarship students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sportname from sportsinfo where onscholarship = 'Y' group by sportname order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show student ids who don't have any sports. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student except select stuid from sportsinfo

### Instruction:

Convert text to sql: What are the ids of all students who don't play sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student except select stuid from sportsinfo
### Instruction:

Convert text to sql: Show student ids who are on scholarship and have major 600. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'Y'

### Instruction:

Convert text to sql: What are the student ids for those on scholarship in major number 600? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'Y'

### Instruction:

Convert text to sql: Show student ids who are female and play football. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student where sex = 'F' intersect select stuid from sportsinfo where sportname = 'Football'

### Instruction:

Convert text to sql: What are the ids of all female students who play football? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student where sex = 'F' intersect select stuid from sportsinfo where sportname = 'Football'

### Instruction:

Convert text to sql: Show all male student ids who don't play football. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student where sex = 'M' except select stuid from sportsinfo where sportname = 'Football'
### Instruction:

Convert text to sql: What are the ids of all male students who do not play football? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student where sex = 'M' except select stuid from sportsinfo where sportname = 'Football'

### Instruction:

Convert text to sql: Show total hours per week and number of games played for student David Shieber. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.fname = 'David' and student.lname = 'Shieber'

### Instruction:

Convert text to sql: What is the total number of hours per work and number of games played by David Shieber? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.fname = 'David' and student.lname = 'Shieber'

### Instruction:

Convert text to sql: Show total hours per week and number of games played for students under 20. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.age < 20

### Instruction:

Convert text to sql: What is the total number of hours per week and number of games played by students under 20? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.age < 20
### Instruction:

Convert text to sql: How many students play video games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select count ( distinct stuid ) from plays_games

### Instruction:

Convert text to sql: How many different students play games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select count ( distinct stuid ) from plays_games

### Instruction:

Convert text to sql: Show ids of students who don't play video game. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student except select stuid from plays_games

### Instruction:

Convert text to sql: What are the ids of all students who are not video game players? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from student except select stuid from plays_games

### Instruction:

Convert text to sql: Show ids of students who play video game and play sports. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from sportsinfo intersect select stuid from plays_games

### Instruction:

Convert text to sql: What are the ids of all students who played video games and sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid from sportsinfo intersect select stuid from plays_games
### Instruction:

Convert text to sql: Show all game ids and the number of hours played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select gameid , sum ( hours_played ) from plays_games group by gameid

### Instruction:

Convert text to sql: What are ids and total number of hours played for each game? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select gameid , sum ( hours_played ) from plays_games group by gameid

### Instruction:

Convert text to sql: Show all student ids and the number of hours played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid , sum ( hours_played ) from plays_games group by stuid

### Instruction:

Convert text to sql: What are the ids of all students and number of hours played? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select stuid , sum ( hours_played ) from plays_games group by stuid

### Instruction:

Convert text to sql: Show the game name that has most number of hours played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | 

### Response:

select gname from plays_games join video_games on plays_games.gameid = video_games.gameid group by plays_games.gameid order by sum ( hours_played ) desc limit 1