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

Convert text to sql: Show the title and publication dates of books. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select book.title , publication.publication_date from book join publication on book.book_id = publication.book_id

### Instruction:

Convert text to sql: Show writers who have published a book with price more than 4000000. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select book.writer from book join publication on book.book_id = publication.book_id where publication.price > 4000000

### Instruction:

Convert text to sql: Show the titles of books in descending order of publication price. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select book.title from book join publication on book.book_id = publication.book_id order by publication.price desc

### Instruction:

Convert text to sql: Show publishers that have more than one publication. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publisher from publication group by publisher having count ( * ) > 1

### Instruction:

Convert text to sql: Show different publishers together with the number of publications they have. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publisher , count ( * ) from publication group by publisher

### Instruction:

Convert text to sql: Please show the most common publication date. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publication_date from publication group by publication_date order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: List the writers who have written more than one book. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select writer from book group by writer having count ( * ) > 1

### Instruction:

Convert text to sql: List the titles of books that are not published. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select title from book where book_id not in ( select book_id from publication )
### Instruction:

Convert text to sql: Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publisher from publication where price > 10000000 intersect select publisher from publication where price < 5000000

### Instruction:

Convert text to sql: What is the number of distinct publication dates? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select count ( distinct publication_date ) from publication

### Instruction:

Convert text to sql: How many distinct publication dates are there in our record? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select count ( distinct publication_date ) from publication

### Instruction:

Convert text to sql: Show the prices of publications whose publisher is either "Person" or "Wiley" | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select price from publication where publisher = 'Person' or publisher = 'Wiley'
### Instruction:

Convert text to sql: How many actors are there? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select count ( * ) from actor

### Instruction:

Convert text to sql: Count the number of actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select count ( * ) from actor

### Instruction:

Convert text to sql: List the name of actors in ascending alphabetical order. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from actor order by name asc

### Instruction:

Convert text to sql: What are the names of actors, ordered alphabetically? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from actor order by name asc

### Instruction:

Convert text to sql: What are the characters and duration of actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select character , duration from actor

### Instruction:

Convert text to sql: Return the characters and durations for each actor. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select character , duration from actor

### Instruction:

Convert text to sql: List the name of actors whose age is not 20. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from actor where age != 20

### Instruction:

Convert text to sql: What are the names of actors who are not 20 years old? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from actor where age != 20

### Instruction:

Convert text to sql: What are the characters of actors in descending order of age? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select character from actor order by age desc
### Instruction:

Convert text to sql: Return the characters for actors, ordered by age descending. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select character from actor order by age desc

### Instruction:

Convert text to sql: What is the duration of the oldest actor? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select duration from actor order by age desc limit 1

### Instruction:

Convert text to sql: Return the duration of the actor with the greatest age. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select duration from actor order by age desc limit 1

### Instruction:

Convert text to sql: What are the names of musicals with nominee "Bob Fosse"? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from musical where nominee = 'Bob Fosse'

### Instruction:

Convert text to sql: Return the names of musicals who have the nominee Bob Fosse. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from musical where nominee = 'Bob Fosse'

### Instruction:

Convert text to sql: What are the distinct nominees of the musicals with the award that is not "Tony Award"? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select distinct nominee from musical where award != 'Tony Award'

### Instruction:

Convert text to sql: Return the different nominees of musicals that have an award that is not the Tony Award. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select distinct nominee from musical where award != 'Tony Award'

### Instruction:

Convert text to sql: Show names of actors and names of musicals they are in. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select actor.name , musical.name from actor join musical on actor.musical_id = musical.musical_id
### Instruction:

Convert text to sql: What are the names of actors and the musicals that they are in? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select actor.name , musical.name from actor join musical on actor.musical_id = musical.musical_id

### Instruction:

Convert text to sql: Show names of actors that have appeared in musical with name "The Phantom of the Opera". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select actor.name from actor join musical on actor.musical_id = musical.musical_id where musical.name = 'The Phantom of the Opera'

### Instruction:

Convert text to sql: What are the names of actors who have been in the musical titled The Phantom of the Opera? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select actor.name from actor join musical on actor.musical_id = musical.musical_id where musical.name = 'The Phantom of the Opera'

### Instruction:

Convert text to sql: Show names of actors in descending order of the year their musical is awarded. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select actor.name from actor join musical on actor.musical_id = musical.musical_id order by musical.year desc

### Instruction:

Convert text to sql: What are the names of actors ordered descending by the year in which their musical was awarded? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select actor.name from actor join musical on actor.musical_id = musical.musical_id order by musical.year desc

### Instruction:

Convert text to sql: Show names of musicals and the number of actors who have appeared in the musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select musical.name , count ( * ) from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id

### Instruction:

Convert text to sql: How many actors have appeared in each musical? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select musical.name , count ( * ) from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id
### Instruction:

Convert text to sql: Show names of musicals which have at least three actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select musical.name from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id having count ( * ) >= 3

### Instruction:

Convert text to sql: What are the names of musicals who have at 3 or more actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select musical.name from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id having count ( * ) >= 3

### Instruction:

Convert text to sql: Show different nominees and the number of musicals they have been nominated. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee , count ( * ) from musical group by nominee

### Instruction:

Convert text to sql: How many musicals has each nominee been nominated for? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee , count ( * ) from musical group by nominee

### Instruction:

Convert text to sql: Please show the nominee who has been nominated the greatest number of times. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical group by nominee order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Who is the nominee who has been nominated for the most musicals? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical group by nominee order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: List the most common result of the musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select result from musical group by result order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Return the most frequent result across all musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select result from musical group by result order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: List the nominees that have been nominated more than two musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical group by nominee having count ( * ) > 2

### Instruction:

Convert text to sql: Who are the nominees who have been nominated more than two times? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical group by nominee having count ( * ) > 2

### Instruction:

Convert text to sql: List the name of musicals that do not have actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from musical where musical_id not in ( select musical_id from actor )

### Instruction:

Convert text to sql: What are the names of musicals who have no actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select name from musical where musical_id not in ( select musical_id from actor )

### Instruction:

Convert text to sql: Show the nominees that have nominated musicals for both "Tony Award" and "Drama Desk Award". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical where award = 'Tony Award' intersect select nominee from musical where award = 'Drama Desk Award'

### Instruction:

Convert text to sql: Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical where award = 'Tony Award' intersect select nominee from musical where award = 'Drama Desk Award'

### Instruction:

Convert text to sql: Show the musical nominee with award "Bob Fosse" or "Cleavant Derricks". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical where award = 'Tony Award' or award = 'Cleavant Derricks'
### Instruction:

Convert text to sql: Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | 

### Response:

select nominee from musical where award = 'Tony Award' or award = 'Cleavant Derricks'
### Instruction:

Convert text to sql: Find the emails of the user named "Mary". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select email from user_profiles where name = 'Mary'

### Instruction:

Convert text to sql: What is the partition id of the user named "Iron Man". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select partitionid from user_profiles where name = 'Iron Man'

### Instruction:

Convert text to sql: How many users are there? | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select count ( * ) from user_profiles

### Instruction:

Convert text to sql: How many followers does each user have? | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select count ( * ) from follows

### Instruction:

Convert text to sql: Find the number of followers for each user. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select count ( * ) from follows group by f1

### Instruction:

Convert text to sql: Find the number of tweets in record. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select count ( * ) from tweets

### Instruction:

Convert text to sql: Find the number of users who posted some tweets. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select count ( distinct uid ) from tweets

### Instruction:

Convert text to sql: Find the name and email of the user whose name contains the word 'Swift'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | 

### Response:

select name , email from user_profiles where name like '%Swift%'