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

Convert text to sql: What are the themes and years for exhibitions, sorted by ticket price descending? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select theme , year from exhibition order by ticket_price desc

### Instruction:

Convert text to sql: What is the theme, date, and attendance for the exhibition in year 2004? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select exhibition.theme , exhibition_record.date , exhibition_record.attendance from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition.year = 2004

### Instruction:

Convert text to sql: Return the themes, dates, and attendance for exhibitions that happened in 2004. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select exhibition.theme , exhibition_record.date , exhibition_record.attendance from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition.year = 2004

### Instruction:

Convert text to sql: Show all artist names who didn't have an exhibition in 2004. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select name from artist except select artist.name from exhibition join artist on exhibition.artist_id = artist.artist_id where exhibition.year = 2004

### Instruction:

Convert text to sql: What are the names of artists who did not have an exhibition in 2004? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select name from artist except select artist.name from exhibition join artist on exhibition.artist_id = artist.artist_id where exhibition.year = 2004
### Instruction:

Convert text to sql: Show the theme for exhibitions with both records of an attendance below 100 and above 500. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance < 100 intersect select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 500

### Instruction:

Convert text to sql: Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance < 100 intersect select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 500

### Instruction:

Convert text to sql: How many exhibitions have a attendance more than 100 or have a ticket price below 10? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select count ( * ) from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 100 or exhibition.ticket_price < 10

### Instruction:

Convert text to sql: Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select count ( * ) from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 100 or exhibition.ticket_price < 10
### Instruction:

Convert text to sql: Show all artist names with an average exhibition attendance over 200. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select artist.name from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id join artist on artist.artist_id = exhibition.artist_id group by artist.artist_id having avg ( exhibition_record.attendance ) > 200

### Instruction:

Convert text to sql: What are the names of artist whose exhibitions draw over 200 attendees on average? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select artist.name from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id join artist on artist.artist_id = exhibition.artist_id group by artist.artist_id having avg ( exhibition_record.attendance ) > 200
### Instruction:

Convert text to sql: Find the id of the item whose title is "orange". | 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 i_id from item where title = 'orange'

### Instruction:

Convert text to sql: List all information in the item table. | 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 item

### Instruction:

Convert text to sql: Find the number of 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 count ( * ) from review

### Instruction:

Convert text to sql: How many users are there? | 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 useracct

### Instruction:

Convert text to sql: Find the average and maximum rating of all 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 avg ( rating ) , max ( rating ) from review

### Instruction:

Convert text to sql: Find the highest rank of all 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 min ( rank ) from review

### Instruction:

Convert text to sql: How many different users wrote some 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 count ( distinct u_id ) from review
### Instruction:

Convert text to sql: How many different items were reviewed by some users? | 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 ( distinct i_id ) from review

### Instruction:

Convert text to sql: Find the number of 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 count ( * ) from item where i_id not in ( select i_id from review )

### 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 name from useracct where u_id not in ( select u_id from review )

### Instruction:

Convert text to sql: Find the names of goods that receive a rating of 10. | 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 item.title from item join review on item.i_id = review.i_id where review.rating = 10

### 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 item.title from item join review on item.i_id = review.i_id where review.rating > ( select avg ( rating ) from review )

### 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 item.title from item join review on item.i_id = review.i_id where review.rating < 5
### 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 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

### 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 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

### 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 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

### 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 title from item order by title asc

### 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 useracct.name from useracct join review on useracct.u_id = review.u_id group by review.u_id order by count ( * ) desc limit 1
### 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 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

### 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 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

### 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 useracct.name , avg ( review.rating ) from useracct join review on useracct.u_id = review.u_id group by review.u_id

### 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 useracct.name , count ( * ) from useracct join review on useracct.u_id = review.u_id group by review.u_id

### 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 useracct.name from useracct join review on useracct.u_id = review.u_id order by review.rating desc limit 1

### 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 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
### 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 useracct.name , avg ( trust ) from useracct join trust on useracct.u_id = trust.target_u_id group by trust.target_u_id

### 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 useracct.name from useracct join trust on useracct.u_id = trust.target_u_id order by trust asc limit 1

### 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 title from item where i_id not in ( select i_id from review )

### 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 name from useracct where u_id not in ( select u_id from review )

### 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 useracct where u_id not in ( select u_id from review )

### 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 item where i_id not in ( select i_id from review )
### 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 player

### 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 player_name from player order by votes asc

### 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 gender , occupation from player

### 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 player_name , residence from player where occupation != 'Researcher'