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

Convert text to sql: What are the full names of customers who have accounts? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select distinct customers.customer_first_name , customers.customer_last_name from customers join accounts on customers.customer_id = accounts.customer_id

### Instruction:

Convert text to sql: How many customers have an account? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( distinct customer_id ) from accounts

### Instruction:

Convert text to sql: Count the number of customers who hold an account. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( distinct customer_id ) from accounts
### Instruction:

Convert text to sql: How many customers do we have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers

### Instruction:

Convert text to sql: Count the number of customers. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers

### Instruction:

Convert text to sql: Show ids, first names, last names, and phones for all customers. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customer_id , customer_first_name , customer_last_name , customer_phone from customers
### Instruction:

Convert text to sql: What are the ids, full names, and phones of each customer? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customer_id , customer_first_name , customer_last_name , customer_phone from customers

### Instruction:

Convert text to sql: What is the phone and email for customer with first name Aniyah and last name Feest? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customer_phone , customer_email from customers where customer_first_name = 'Aniyah' and customer_last_name = 'Feest'

### Instruction:

Convert text to sql: Return the phone and email of the customer with the first name Aniyah and last name Feest. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customer_phone , customer_email from customers where customer_first_name = 'Aniyah' and customer_last_name = 'Feest'
### Instruction:

Convert text to sql: Show the number of customer cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards

### Instruction:

Convert text to sql: How many customer cards are there? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards

### Instruction:

Convert text to sql: Show ids, customer ids, card type codes, card numbers for all cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select card_id , customer_id , card_type_code , card_number from customers_cards
### Instruction:

Convert text to sql: What are card ids, customer ids, card types, and card numbers for each customer card? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select card_id , customer_id , card_type_code , card_number from customers_cards

### Instruction:

Convert text to sql: Show the date valid from and the date valid to for the card with card number '4560596484842'. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select date_valid_from , date_valid_to from customers_cards where card_number = '4560596484842'

### Instruction:

Convert text to sql: What are the valid from and valid to dates for the card with the number 4560596484842? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select date_valid_from , date_valid_to from customers_cards where card_number = '4560596484842'
### Instruction:

Convert text to sql: What is the first name, last name, and phone of the customer with card 4560596484842. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customers.customer_first_name , customers.customer_last_name , customers.customer_phone from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers_cards.card_number = '4560596484842'

### Instruction:

Convert text to sql: Return the full name and phone of the customer who has card number 4560596484842. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customers.customer_first_name , customers.customer_last_name , customers.customer_phone from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers_cards.card_number = '4560596484842'

### Instruction:

Convert text to sql: How many cards does customer Art Turcotte have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Art' and customers.customer_last_name = 'Turcotte'
### Instruction:

Convert text to sql: Count the number of cards the customer with the first name Art and last name Turcotte has. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Art' and customers.customer_last_name = 'Turcotte'

### Instruction:

Convert text to sql: How many debit cards do we have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards where card_type_code = 'Debit'

### Instruction:

Convert text to sql: Count the number of customer cards of the type Debit. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards where card_type_code = 'Debit'
### Instruction:

Convert text to sql: How many credit cards does customer Blanche Huels have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Blanche' and customers.customer_last_name = 'Huels' and customers_cards.card_type_code = 'Credit'

### Instruction:

Convert text to sql: Count the number of credit cards that the customer with first name Blanche and last name Huels has. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Blanche' and customers.customer_last_name = 'Huels' and customers_cards.card_type_code = 'Credit'

### Instruction:

Convert text to sql: Show all customer ids and the number of cards owned by each customer. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | 

### Response:

select customer_id , count ( * ) from customers_cards group by customer_id