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

Convert text to sql: Find the title and star rating of the movie that got the least rating star for each reviewer. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , min ( _ ) from _ group by _ | select movie.title , rating.rid , rating.stars , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.rid
### Instruction:

Convert text to sql: For each reviewer id, what is the title and rating for the movie with the smallest rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , min ( _ ) from _ group by _ | select movie.title , rating.rid , rating.stars , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.rid
### Instruction:

Convert text to sql: Find the title and score of the movie with the lowest rating among all movies directed by each director. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , min ( _ ) from _ group by _ | select movie.title , rating.stars , movie.director , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by movie.director
### Instruction:

Convert text to sql: For each director, what is the title and score of their most poorly rated movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , min ( _ ) from _ group by _ | select movie.title , rating.stars , movie.director , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by movie.director
### Instruction:

Convert text to sql: What is the name of the movie that is rated by most of times? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select movie.title , rating.mid from rating join movie on rating.mid = movie.mid group by rating.mid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the name of the movie that has been reviewed the most? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select movie.title , rating.mid from rating join movie on rating.mid = movie.mid group by rating.mid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the titles of all movies that have rating star is between 3 and 5? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ between _ and _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars between 3 and 5
### Instruction:

Convert text to sql: What are the titles of all movies that have between 3 and 5 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ between _ and _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars between 3 and 5
### Instruction:

Convert text to sql: Find the names of reviewers who had given higher than 3 star ratings. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars > 3
### Instruction:

Convert text to sql: What are the names of the reviewers who have rated a movie more than 3 stars before? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars > 3
### Instruction:

Convert text to sql: Find the average rating star for each movie that are not reviewed by Brittany Harris. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , avg ( _ ) from _ where _ not in ( select _ from _ where _ ) group by _ | select mid , avg ( stars ) from rating where mid not in ( select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' ) group by mid
### Instruction:

Convert text to sql: What is the average rating for each movie that has never been reviewed by Brittany Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , avg ( _ ) from _ where _ not in ( select _ from _ where _ ) group by _ | select mid , avg ( stars ) from rating where mid not in ( select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' ) group by mid
### Instruction:

Convert text to sql: What are the ids of the movies that are not reviewed by Brittany Harris. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ except select _ from _ where _ | select mid from rating except select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris'
### Instruction:

Convert text to sql: What are the ids of all moviest hat have not been reviewed by Britanny Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ except select _ from _ where _ | select mid from rating except select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris'
### Instruction:

Convert text to sql: Find the average rating star for each movie that received at least 2 ratings. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , avg ( _ ) from _ group by _ having count ( _ ) >= _ | select mid , avg ( stars ) from rating group by mid having count ( * ) >= 2
### Instruction:

Convert text to sql: For each movie that received more than 3 reviews, what is the average rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , avg ( _ ) from _ group by _ having count ( _ ) >= _ | select mid , avg ( stars ) from rating group by mid having count ( * ) >= 2
### Instruction:

Convert text to sql: find the ids of reviewers who did not give 4 star. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ except select _ from _ where _ | select rid from rating except select rid from rating where stars = 4
### Instruction:

Convert text to sql: What are the ids of all reviewers who did not give 4 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ except select _ from _ where _ | select rid from rating except select rid from rating where stars = 4
### Instruction:

Convert text to sql: Find the ids of reviewers who didn't only give 4 star. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ | select rid from rating where stars != 4
### Instruction:

Convert text to sql: What are the ids of all reviewers who have not given 4 stars at least once? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ | select rid from rating where stars != 4
### Instruction:

Convert text to sql: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select distinct _ from _ where _ | select distinct movie.title from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' or movie.year > 2000
### Instruction:

Convert text to sql: What are the names of all movies that were made after 2000 or reviewed by Brittany Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select distinct _ from _ where _ | select distinct movie.title from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' or movie.year > 2000
### Instruction:

Convert text to sql: What are names of the movies that are either made before 1980 or directed by James Cameron? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ | select title from movie where director = 'James Cameron' or year < 1980
### Instruction:

Convert text to sql: What are the names of all movies made before 1980 or had James Cameron as the director? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ | select title from movie where director = 'James Cameron' or year < 1980
### Instruction:

Convert text to sql: What are the names of reviewers who had rated 3 star and 4 star? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 3 intersect select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 4
### Instruction:

Convert text to sql: What are the names of all reviewers that have given 3 or 4 stars for reviews? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 3 intersect select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 4
### Instruction:

Convert text to sql: What are the names of movies that get 3 star and 4 star? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 3 intersect select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 4
### Instruction:

Convert text to sql: What are the names of all movies that received 3 or 4 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 3 intersect select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 4
### Instruction:

Convert text to sql: How many counties are there? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from county_public_safety
### Instruction:

Convert text to sql: Count the number of countries. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from county_public_safety
### Instruction:

Convert text to sql: List the names of counties in descending order of population. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ desc | select name from county_public_safety order by population desc
### Instruction:

Convert text to sql: What are the names of the counties of public safety, ordered by population descending? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ desc | select name from county_public_safety order by population desc
### Instruction:

Convert text to sql: List the distinct police forces of counties whose location is not on east side. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select distinct _ from _ where _ | select distinct police_force from county_public_safety where location != 'East'
### Instruction:

Convert text to sql: What are the different police forces of counties that are not located in the East? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select distinct _ from _ where _ | select distinct police_force from county_public_safety where location != 'East'
### Instruction:

Convert text to sql: What are the minimum and maximum crime rate of counties? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select min ( _ ) , max ( _ ) from _ | select min ( crime_rate ) , max ( crime_rate ) from county_public_safety
### Instruction:

Convert text to sql: Return the minimum and maximum crime rates across all counties. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select min ( _ ) , max ( _ ) from _ | select min ( crime_rate ) , max ( crime_rate ) from county_public_safety
### Instruction:

Convert text to sql: Show the crime rates of counties in ascending order of number of police officers. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ asc | select crime_rate from county_public_safety order by police_officers asc
### Instruction:

Convert text to sql: What are the crime rates of counties sorted by number of offices ascending? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ asc | select crime_rate from county_public_safety order by police_officers asc
### Instruction:

Convert text to sql: What are the names of cities in ascending alphabetical order? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ asc | select name from city order by name asc
### Instruction:

Convert text to sql: Return the names of cities, ordered alphabetically. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ asc | select name from city order by name asc
### Instruction:

Convert text to sql: What are the percentage of hispanics in cities with the black percentage higher than 10? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ where _ | select hispanic from city where black > 10
### Instruction:

Convert text to sql: Return the hispanic percentage for cities in which the black percentage is greater than 10. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ where _ | select hispanic from city where black > 10
### Instruction:

Convert text to sql: List the name of the county with the largest population. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from county_public_safety order by population desc limit 1
### Instruction:

Convert text to sql: What is the name of the county with the greatest population? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from county_public_safety order by population desc limit 1
### Instruction:

Convert text to sql: List the names of the city with the top 5 white percentages. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from city order by white desc limit 5
### Instruction:

Convert text to sql: What are the names of the five cities with the greatest proportion of white people? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from city order by white desc limit 5
### Instruction:

Convert text to sql: Show names of cities and names of counties they are in. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ | select city.name , county_public_safety.name from city join county_public_safety on city.county_id = county_public_safety.county_id
### Instruction:

Convert text to sql: What are the names of cities, as well as the names of the counties they correspond to? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ | select city.name , county_public_safety.name from city join county_public_safety on city.county_id = county_public_safety.county_id
### Instruction:

Convert text to sql: Show white percentages of cities and the crime rates of counties they are in. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | 

### Response:

select _ from _ | select city.white , county_public_safety.crime_rate from city join county_public_safety on city.county_id = county_public_safety.county_id