richardr1126/spider-skeleton-context-instruct huggingface dataset:
### 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ order by _ asc | 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 _ from _ order by _ asc | 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 _ from _ group by _ order by sum ( _ ) asc | 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 _ from _ group by _ order by sum ( _ ) asc | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ ) from _ | 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 _ ) from _ | 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 _ ) from _ | 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 _ ) from _ | 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 _ ) from _ | 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 _ ) from _ | 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 _ from _ where _ like _ | 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 _ from _ where _ like _ | 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 ( _ ) from _ where _ | 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 ( _ ) from _ where _ | 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 _ from _ where _ intersect select _ from _ where _ | 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 _ from _ where _ intersect select _ from _ where _ | 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 _ from _ except select _ from _ where _ | 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 _ from _ except select _ from _ where _ | 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 _ from _ except select _ from _ where _ | 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 _ from _ except select _ from _ where _ | 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: Find the name of customers who have loans of both Mortgages and Auto. | 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 _ from _ where _ intersect select _ from _ where _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Mortgages' intersect select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Auto'
### Instruction:

Convert text to sql: What are the names of customers who have taken both Mortgage and Auto 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 _ from _ where _ intersect select _ from _ where _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Mortgages' intersect select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Auto'
### Instruction:

Convert text to sql: Find the name of customers whose credit score is below the average credit scores of all 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 _ from _ where _ < ( select avg ( _ ) from _ ) | select cust_name from customer where credit_score < ( select avg ( credit_score ) from customer )
### Instruction:

Convert text to sql: What are the names of customers with credit score less than the average credit score across 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 _ from _ where _ < ( select avg ( _ ) from _ ) | select cust_name from customer where credit_score < ( select avg ( credit_score ) from customer )
### Instruction:

Convert text to sql: Find the branch name of the bank that has the most number of 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 _ from _ order by _ desc limit _ | select bname from bank order by no_of_customers desc limit 1
### Instruction:

Convert text to sql: What is the name of the bank branch with the greatest number of 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 _ from _ order by _ desc limit _ | select bname from bank order by no_of_customers desc limit 1
### Instruction:

Convert text to sql: Find the name of customer who has the lowest credit score. | 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 _ from _ order by _ asc limit _ | select cust_name from customer order by credit_score asc limit 1
### Instruction:

Convert text to sql: What is the name of the customer with the worst credit score? | 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 _ from _ order by _ asc limit _ | select cust_name from customer order by credit_score asc limit 1
### Instruction:

Convert text to sql: Find the name, account type, and account balance of the customer who has the highest credit score. | 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 _ from _ order by _ desc limit _ | select cust_name , acc_type , acc_bal from customer order by credit_score desc limit 1
### Instruction:

Convert text to sql: What is the name, account type, and account balance corresponding to the customer with the highest credit score? | 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 _ from _ order by _ desc limit _ | select cust_name , acc_type , acc_bal from customer order by credit_score desc limit 1
### Instruction:

Convert text to sql: Find the name of customer who has the highest amount of 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 _ from _ group by _ order by sum ( _ ) desc limit _ | 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 ) desc limit 1
### Instruction:

Convert text to sql: What is the name of the customer who has greatest 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 _ from _ group by _ order by sum ( _ ) desc limit _ | 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 ) desc limit 1
### Instruction:

Convert text to sql: Find the state which has the most number of 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 _ from _ group by _ order by sum ( _ ) desc limit _ | select state from bank group by state order by sum ( no_of_customers ) desc limit 1
### Instruction:

Convert text to sql: Which state has the greatest total 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 _ from _ group by _ order by sum ( _ ) desc limit _ | select state from bank group by state order by sum ( no_of_customers ) desc limit 1
### Instruction:

Convert text to sql: For each account type, find the average account balance of customers with credit score lower than 50. | 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 ( _ ) , _ from _ where _ group by _ | select avg ( acc_bal ) , acc_type from customer where credit_score < 50 group by acc_type
### Instruction:

Convert text to sql: What is the average account balance of customers with credit score below 50 for the 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 avg ( _ ) , _ from _ where _ group by _ | select avg ( acc_bal ) , acc_type from customer where credit_score < 50 group by acc_type
### Instruction:

Convert text to sql: For each state, find the total account balance of customers whose credit score is above 100. | 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 ( _ ) , _ from _ where _ group by _ | select sum ( acc_bal ) , state from customer where credit_score > 100 group by state
### Instruction:

Convert text to sql: What is the total account balance for customers with a credit score of above 100 for the different states? | 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 ( _ ) , _ from _ where _ group by _ | select sum ( acc_bal ) , state from customer where credit_score > 100 group by state