db_id
stringlengths 4
31
| text
stringlengths 398
4.9k
|
---|---|
epinions_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 sql: Find the titles of items whose rating is higher than the average review rating of all items. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ where _ > ( select avg ( _ ) from _ ) | select item.title from item join review on item.i_id = review.i_id where review.rating > ( select avg ( rating ) from review ) |
epinions_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 sql: Find the titles of items that received any rating below 5. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ where _ | select item.title from item join review on item.i_id = review.i_id where review.rating < 5 |
epinions_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 sql: Find the titles of items that received both a rating higher than 8 and a rating below 5. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select item.title from item join review on item.i_id = review.i_id where review.rating > 8 intersect select item.title from item join review on item.i_id = review.i_id where review.rating < 5 |
epinions_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 sql: Find the names of items whose rank is higher than 3 and whose average rating is above 5. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ where _ intersect select _ from _ group by _ having avg ( _ ) > _ | select item.title from item join review on item.i_id = review.i_id where review.rank > 3 intersect select item.title from item join review on item.i_id = review.i_id group by review.i_id having avg ( review.rating ) > 5 |
epinions_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 sql: Find the name of the item with the lowest average rating. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ group by _ order by avg ( _ ) asc limit _ | select item.title from item join review on item.i_id = review.i_id group by review.i_id order by avg ( review.rating ) asc limit 1 |
epinions_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 sql: List the titles of all items in alphabetic order . | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ order by _ asc | select title from item order by title asc |
epinions_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 sql: Find the name of the user who gives the most reviews. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select useracct.name from useracct join review on useracct.u_id = review.u_id group by review.u_id order by count ( * ) desc limit 1 |
epinions_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 sql: Find the name and id of the item with the highest average rating. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ group by _ order by avg ( _ ) desc limit _ | select item.title , item.i_id from item join review on item.i_id = review.i_id group by review.i_id order by avg ( review.rating ) desc limit 1 |
epinions_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 sql: Find the name and id of the good with the highest average rank. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ group by _ order by avg ( _ ) desc limit _ | select item.title , item.i_id from item join review on item.i_id = review.i_id group by review.i_id order by avg ( review.rank ) desc limit 1 |
epinions_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 sql: For each user, return the name and the average rating of reviews given by them. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ , avg ( _ ) from _ group by _ | select useracct.name , avg ( review.rating ) from useracct join review on useracct.u_id = review.u_id group by review.u_id |
epinions_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 sql: For each user, find their name and the number of reviews written by them. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ , count ( _ ) from _ group by _ | select useracct.name , count ( * ) from useracct join review on useracct.u_id = review.u_id group by review.u_id |
epinions_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 sql: Find the name of the user who gave the highest rating. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ order by _ desc limit _ | select useracct.name from useracct join review on useracct.u_id = review.u_id order by review.rating desc limit 1 |
epinions_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 sql: Find the name of the source user with the highest average trust score. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ group by _ order by avg ( _ ) desc limit _ | select useracct.name from useracct join trust on useracct.u_id = trust.source_u_id group by trust.source_u_id order by avg ( trust ) desc limit 1 |
epinions_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 sql: Find each target user's name and average trust score. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ , avg ( _ ) from _ group by _ | select useracct.name , avg ( trust ) from useracct join trust on useracct.u_id = trust.target_u_id group by trust.target_u_id |
epinions_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 sql: Find the name of the target user with the lowest trust score. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ order by _ asc limit _ | select useracct.name from useracct join trust on useracct.u_id = trust.target_u_id order by trust asc limit 1 |
epinions_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 sql: Find the names of the items that did not receive any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select title from item where i_id not in ( select i_id from review ) |
epinions_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 sql: Find the names of users who did not leave any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select name from useracct where u_id not in ( select u_id from review ) |
epinions_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 sql: Find the number of users who did not write any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from useracct where u_id not in ( select u_id from review ) |
epinions_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 sql: Find the number of items without any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id |
### Response:
select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from item where i_id not in ( select i_id from review ) |
riding_club | 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 sql: How many players are there? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select count ( _ ) from _ | select count ( * ) from player |
riding_club | 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 sql: List the names of players in ascending order of votes. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ order by _ asc | select player_name from player order by votes asc |
riding_club | 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 sql: What are the gender and occupation of players? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ | select gender , occupation from player |
riding_club | 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 sql: List the name and residence for players whose occupation is not "Researcher". | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ where _ | select player_name , residence from player where occupation != 'Researcher' |
riding_club | 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 sql: Show the names of sponsors of players whose residence is either "Brandon" or "Birtle". | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ where _ | select sponsor_name from player where residence = 'Brandon' or residence = 'Birtle' |
riding_club | 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 sql: What is the name of the player with the largest number of votes? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ order by _ desc limit _ | select player_name from player order by votes desc limit 1 |
riding_club | 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 sql: Show different occupations along with the number of players in each occupation. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ , count ( _ ) from _ group by _ | select occupation , count ( * ) from player group by occupation |
riding_club | 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 sql: Please show the most common occupation of players. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select occupation from player group by occupation order by count ( * ) desc limit 1 |
riding_club | 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 sql: Show the residences that have at least two players. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ group by _ having count ( _ ) >= _ | select residence from player group by residence having count ( * ) >= 2 |
riding_club | 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 sql: Show the names of players and names of their coaches. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ | select player.player_name , coach.coach_name from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id |
riding_club | 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 sql: Show the names of players coached by the rank 1 coach. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ where _ | select player.player_name from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id where coach.rank = 1 |
riding_club | 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 sql: Show the names and genders of players with a coach starting after 2011. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ where _ | select player.player_name , player.gender from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id where player_coach.starting_year > 2011 |
riding_club | 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 sql: Show the names of players and names of their coaches in descending order of the votes of players. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ order by _ desc | select player.player_name , coach.coach_name from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id order by player.votes desc |
riding_club | 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 sql: List the names of players that do not have coaches. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select player_name from player where player_id not in ( select player_id from player_coach ) |
riding_club | 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 sql: Show the residences that have both a player of gender "M" and a player of gender "F". | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select residence from player where gender = 'M' intersect select residence from player where gender = 'F' |
riding_club | 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 sql: How many coaches does each club has? List the club id, name and the number of coaches. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ , count ( _ ) from _ group by _ | select club.club_id , club.club_name , count ( * ) from club join coach on club.club_id = coach.club_id group by club.club_id |
riding_club | 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 sql: How many gold medals has the club with the most coaches won? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select match_result.club_id , match_result.gold from match_result join coach on match_result.club_id = coach.club_id group by match_result.club_id order by count ( * ) desc limit 1 |
gymnast | 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 sql: How many gymnasts are there? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select count ( _ ) from _ | select count ( * ) from gymnast |
gymnast | 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 sql: Count the number of gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select count ( _ ) from _ | select count ( * ) from gymnast |
gymnast | 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 sql: List the total points of gymnasts in descending order. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc | select total_points from gymnast order by total_points desc |
gymnast | 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 sql: What are the total points for all gymnasts, ordered by total points descending? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc | select total_points from gymnast order by total_points desc |
gymnast | 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 sql: List the total points of gymnasts in descending order of floor exercise points. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc | select total_points from gymnast order by floor_exercise_points desc |
gymnast | 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 sql: What are the total points of gymnasts, ordered by their floor exercise points descending? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc | select total_points from gymnast order by floor_exercise_points desc |
gymnast | 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 sql: What is the average horizontal bar points for all gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select avg ( _ ) from _ | select avg ( horizontal_bar_points ) from gymnast |
gymnast | 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 sql: Return the average horizontal bar points across all gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select avg ( _ ) from _ | select avg ( horizontal_bar_points ) from gymnast |
gymnast | 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 sql: What are the names of people in ascending alphabetical order? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ asc | select name from people order by name asc |
gymnast | 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 sql: Return the names of people, ordered alphabetically. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ asc | select name from people order by name asc |
gymnast | 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 sql: What are the names of gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id |
gymnast | 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 sql: Return the names of the gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id |
gymnast | 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 sql: What are the names of gymnasts whose hometown is not "Santo Domingo"? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ where _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id where people.hometown != 'Santo Domingo' |
gymnast | 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 sql: Return the names of gymnasts who did not grow up in Santo Domingo. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ where _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id where people.hometown != 'Santo Domingo' |
gymnast | 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 sql: What is the age of the tallest person? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc limit _ | select age from people order by height desc limit 1 |
gymnast | 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 sql: Return the age of the person with the greatest height. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc limit _ | select age from people order by height desc limit 1 |
gymnast | 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 sql: List the names of the top 5 oldest people. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc limit _ | select name from people order by age desc limit 5 |
gymnast | 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 sql: What are the names of the five oldest people? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc limit _ | select name from people order by age desc limit 5 |
gymnast | 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 sql: What is the total point count of the youngest gymnast? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ asc limit _ | select gymnast.total_points from gymnast join people on gymnast.gymnast_id = people.people_id order by people.age asc limit 1 |
gymnast | 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 sql: Return the total points of the gymnast with the lowest age. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ asc limit _ | select gymnast.total_points from gymnast join people on gymnast.gymnast_id = people.people_id order by people.age asc limit 1 |
gymnast | 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 sql: What is the average age of all gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select avg ( _ ) from _ | select avg ( people.age ) from gymnast join people on gymnast.gymnast_id = people.people_id |
gymnast | 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 sql: Return the average age across all gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select avg ( _ ) from _ | select avg ( people.age ) from gymnast join people on gymnast.gymnast_id = people.people_id |
gymnast | 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 sql: What are the distinct hometowns of gymnasts with total points more than 57.5? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select distinct _ from _ where _ | select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id where gymnast.total_points > 57.5 |
gymnast | 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 sql: Give the different hometowns of gymnasts that have a total point score of above 57.5. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select distinct _ from _ where _ | select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id where gymnast.total_points > 57.5 |
gymnast | 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 sql: What are the hometowns of gymnasts and the corresponding number of gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ , count ( _ ) from _ group by _ | select people.hometown , count ( * ) from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown |
gymnast | 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 sql: How many gymnasts are from each hometown? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ , count ( _ ) from _ group by _ | select people.hometown , count ( * ) from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown |
gymnast | 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 sql: What is the most common hometown of gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown order by count ( * ) desc limit 1 |
gymnast | 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 sql: Return the hometown that is most common among gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown order by count ( * ) desc limit 1 |
gymnast | 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 sql: What are the hometowns that are shared by at least two gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ group by _ having count ( _ ) >= _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown having count ( * ) >= 2 |
gymnast | 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 sql: Give the hometowns from which two or more gymnasts are from. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ group by _ having count ( _ ) >= _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown having count ( * ) >= 2 |
gymnast | 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 sql: List the names of gymnasts in ascending order by their heights. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ asc | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id order by people.height asc |
gymnast | 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 sql: What are the names of gymnasts, ordered by their heights ascending? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ asc | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id order by people.height asc |
gymnast | 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 sql: List the distinct hometowns that are not associated with any gymnast. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select distinct _ from _ except select distinct _ from _ | select distinct hometown from people except select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id |
gymnast | 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 sql: From which hometowns did no gymnasts come from? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select distinct _ from _ except select distinct _ from _ | select distinct hometown from people except select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id |
gymnast | 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 sql: Show the hometowns shared by people older than 23 and younger than 20. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select hometown from people where age > 23 intersect select hometown from people where age < 20 |
gymnast | 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 sql: From which hometowns did both people older than 23 and younger than 20 come from? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select hometown from people where age > 23 intersect select hometown from people where age < 20 |
gymnast | 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 sql: How many distinct hometowns did these people have? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct hometown ) from people |
gymnast | 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 sql: Count the number of different hometowns of these people. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct hometown ) from people |
gymnast | 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 sql: Show the ages of gymnasts in descending order of total points. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc | select people.age from gymnast join people on gymnast.gymnast_id = people.people_id order by gymnast.total_points desc |
gymnast | 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 sql: What are the ages of the gymnasts, ordered descending by their total points? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id |
### Response:
select _ from _ order by _ desc | select people.age from gymnast join people on gymnast.gymnast_id = people.people_id order by gymnast.total_points desc |
small_bank_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 sql: Find the total savings balance of all accounts except the account with name 'Brown'. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select sum ( _ ) from _ where _ | select sum ( savings.balance ) from accounts join savings on accounts.custid = savings.custid where accounts.name != 'Brown' |
small_bank_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 sql: What is the total balance of savings accounts not belonging to someone with the name Brown? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select sum ( _ ) from _ where _ | select sum ( savings.balance ) from accounts join savings on accounts.custid = savings.custid where accounts.name != 'Brown' |
small_bank_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 sql: How many accounts are there in total? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select count ( _ ) from _ | select count ( * ) from accounts |
small_bank_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 sql: Count the number of accounts. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select count ( _ ) from _ | select count ( * ) from accounts |
small_bank_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 sql: What is the total checking balance in all accounts? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select sum ( _ ) from _ | select sum ( balance ) from checking |
small_bank_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 sql: Find the total balance across checking accounts. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select sum ( _ ) from _ | select sum ( balance ) from checking |
small_bank_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 sql: Find the average checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select avg ( _ ) from _ | select avg ( balance ) from checking |
small_bank_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 sql: What is the average balance in checking accounts? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select avg ( _ ) from _ | select avg ( balance ) from checking |
small_bank_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 sql: How many accounts have a savings balance above the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from savings where balance > ( select avg ( balance ) from savings ) |
small_bank_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 sql: Find the number of accounts with a savings balance that is higher than the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from savings where balance > ( select avg ( balance ) from savings ) |
small_bank_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 sql: Find the name and id of accounts whose checking balance is below the maximum checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ < ( select max ( _ ) from _ ) | select accounts.custid , accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select max ( balance ) from checking ) |
small_bank_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 sql: What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ < ( select max ( _ ) from _ ) | select accounts.custid , accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select max ( balance ) from checking ) |
small_bank_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 sql: What is the checking balance of the account whose owner's name contains the substring 'ee'? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ like _ | select checking.balance from accounts join checking on accounts.custid = checking.custid where accounts.name like '%ee%' |
small_bank_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 sql: Find the balance of the checking account belonging to an owner whose name contains 'ee'. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ like _ | select checking.balance from accounts join checking on accounts.custid = checking.custid where accounts.name like '%ee%' |
small_bank_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 sql: Find the checking balance and saving balance in the Brown's account. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ | select checking.balance , savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where accounts.name = 'Brown' |
small_bank_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 sql: What are the checking and savings balances in accounts belonging to Brown? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ | select checking.balance , savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where accounts.name = 'Brown' |
small_bank_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 sql: Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ > ( select avg ( _ ) from _ ) intersect select _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from checking ) intersect select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance < ( select avg ( balance ) from savings ) |
small_bank_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 sql: What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ > ( select avg ( _ ) from _ ) intersect select _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from checking ) intersect select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance < ( select avg ( balance ) from savings ) |
small_bank_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 sql: Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ in ( select _ from _ where _ > ( select avg ( _ ) from _ ) ) | select savings.balance from accounts join checking on accounts.custid = savings.custid where accounts.name in ( select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings ) ) |
small_bank_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 sql: What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ in ( select _ from _ where _ > ( select avg ( _ ) from _ ) ) | select savings.balance from accounts join checking on accounts.custid = savings.custid where accounts.name in ( select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings ) ) |
small_bank_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 sql: List all customers' names in the alphabetical order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ asc | select name from accounts order by name asc |
small_bank_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 sql: What are the names of all the customers in alphabetical order? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ asc | select name from accounts order by name asc |
small_bank_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 sql: Find the name of account that has the lowest total checking and saving balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ + _ asc limit _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance asc limit 1 |
small_bank_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 sql: What is the name corresponding to the accoung with the lowest sum of checking and savings balances? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ + _ asc limit _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance asc limit 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.