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

Convert text to sql: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | 

### Response:

select first_name from customer where customer_id not in ( select customer_id from rental where rental_date > '2005-08-23 02:06:01' )
### Instruction:

Convert text to sql: Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | 

### Response:

select first_name from customer where customer_id not in ( select customer_id from rental where rental_date > '2005-08-23 02:06:01' )
### Instruction:

Convert text to sql: How many bank branches are there? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( * ) from bank

### Instruction:

Convert text to sql: Count the number of bank branches. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( * ) from bank

### Instruction:

Convert text to sql: How many customers are there? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select sum ( no_of_customers ) from bank

### Instruction:

Convert text to sql: What is the total number of customers across banks? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select sum ( no_of_customers ) from bank

### Instruction:

Convert text to sql: Find the number of customers in the banks at New York City. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select sum ( no_of_customers ) from bank where city = 'New York City'

### Instruction:

Convert text to sql: What is the total number of customers who use banks in New York City? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select sum ( no_of_customers ) from bank where city = 'New York City'

### Instruction:

Convert text to sql: Find the average number of customers in all banks of Utah state. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select avg ( no_of_customers ) from bank where state = 'Utah'
### Instruction:

Convert text to sql: What is the average number of customers across banks in the state of Utah? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select avg ( no_of_customers ) from bank where state = 'Utah'

### Instruction:

Convert text to sql: Find the average number of customers cross all banks. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select avg ( no_of_customers ) from bank

### Instruction:

Convert text to sql: What is the average number of bank customers? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select avg ( no_of_customers ) from bank

### Instruction:

Convert text to sql: Find the city and state of the bank branch named morningside. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select city , state from bank where bname = 'morningside'

### Instruction:

Convert text to sql: What city and state is the bank with the name morningside in? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select city , state from bank where bname = 'morningside'

### Instruction:

Convert text to sql: Find the branch names of banks in the New York state. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select bname from bank where state = 'New York'
### Instruction:

Convert text to sql: What are the names of banks in the state of New York? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select bname from bank where state = 'New York'

### Instruction:

Convert text to sql: List the name of all customers sorted by their account balance in ascending order. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer order by acc_bal asc

### Instruction:

Convert text to sql: What are the names of all customers, ordered by account balance? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer order by acc_bal asc

### Instruction:

Convert text to sql: List the name of all different customers who have some loan sorted by their total loan amount. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name order by sum ( loan.amount ) asc

### Instruction:

Convert text to sql: What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name order by sum ( loan.amount ) asc

### Instruction:

Convert text to sql: Find the state, account type, and credit score of the customer whose number of loan is 0. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select state , acc_type , credit_score from customer where no_of_loans = 0
### Instruction:

Convert text to sql: What are the states, account types, and credit scores for customers who have 0 loans? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select state , acc_type , credit_score from customer where no_of_loans = 0

### Instruction:

Convert text to sql: Find the number of different cities which banks are located at. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( distinct city ) from bank

### Instruction:

Convert text to sql: In how many different cities are banks located? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( distinct city ) from bank

### Instruction:

Convert text to sql: Find the number of different states which banks are located at. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( distinct state ) from bank

### Instruction:

Convert text to sql: In how many different states are banks located? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( distinct state ) from bank

### Instruction:

Convert text to sql: How many distinct types of accounts are there? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( distinct acc_type ) from customer
### Instruction:

Convert text to sql: Count the number of different account types. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select count ( distinct acc_type ) from customer

### Instruction:

Convert text to sql: Find the name and account balance of the customer whose name includes the letter 'a'. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name , acc_bal from customer where cust_name like '%a%'

### Instruction:

Convert text to sql: What are the names and account balances of customers with the letter a in their names? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name , acc_bal from customer where cust_name like '%a%'

### Instruction:

Convert text to sql: Find the total account balance of each customer from Utah or Texas. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select sum ( acc_bal ) from customer where state = 'Utah' or state = 'Texas'

### Instruction:

Convert text to sql: What are the total account balances for each customer from Utah or Texas? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select sum ( acc_bal ) from customer where state = 'Utah' or state = 'Texas'

### Instruction:

Convert text to sql: Find the name of customers who have both saving and checking account types. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer where acc_type = 'saving' intersect select cust_name from customer where acc_type = 'checking'
### Instruction:

Convert text to sql: What are the names of customers who have both savings and checking accounts? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer where acc_type = 'saving' intersect select cust_name from customer where acc_type = 'checking'

### Instruction:

Convert text to sql: Find the name of customers who do not have an saving account. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer except select cust_name from customer where acc_type = 'saving'

### Instruction:

Convert text to sql: What are the names of customers who do not have saving accounts? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer except select cust_name from customer where acc_type = 'saving'

### Instruction:

Convert text to sql: Find the name of customers who do not have a loan with a type of Mortgages. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer except select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan.loan_type = 'Mortgages'

### Instruction:

Convert text to sql: What are the names of customers who have not taken a Mortage loan? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | 

### Response:

select cust_name from customer except select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan.loan_type = 'Mortgages'