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

Convert text to sql: What is the zip code of the customer Carole Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ where _ | select addresses.zip_postcode from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
### Instruction:

Convert text to sql: Which city does has most number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select addresses.city from customers join addresses on customers.customer_address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the city with the most customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select addresses.city from customers join addresses on customers.customer_address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: How much in total does customer with first name as Carole and last name as Bernhard paid? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select sum ( _ ) from _ where _ | select sum ( customer_payments.amount_payment ) from customer_payments join customers on customer_payments.customer_id = customers.customer_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
### Instruction:

Convert text to sql: What is the total amount of moeny paid by the customer Carole Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select sum ( _ ) from _ where _ | select sum ( customer_payments.amount_payment ) from customer_payments join customers on customer_payments.customer_id = customers.customer_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'
### Instruction:

Convert text to sql: List the number of customers that did not have any payment history. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from customer_payments )
### Instruction:

Convert text to sql: How many customers have no payment histories? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from customer_payments )
### Instruction:

Convert text to sql: List first name and last name of customers that have more than 2 payments. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select customers.first_name , customers.last_name from customer_payments join customers on customer_payments.customer_id = customers.customer_id group by customer_payments.customer_id having count ( * ) > 2
### Instruction:

Convert text to sql: What are the first and last names of all customers with more than 2 payments? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select customers.first_name , customers.last_name from customer_payments join customers on customer_payments.customer_id = customers.customer_id group by customer_payments.customer_id having count ( * ) > 2
### Instruction:

Convert text to sql: List all payment methods and number of payments using each payment methods. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from customer_payments group by payment_method_code
### Instruction:

Convert text to sql: For each payment method, how many payments were made? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from customer_payments group by payment_method_code
### Instruction:

Convert text to sql: How many lessons were in cancelled state? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from lessons where lesson_status_code = 'Cancelled'
### Instruction:

Convert text to sql: How many lessons have been cancelled? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from lessons where lesson_status_code = 'Cancelled'
### Instruction:

Convert text to sql: List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ where _ like _ | select lessons.lesson_id from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn' and nickname like '%s%'
### Instruction:

Convert text to sql: What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select _ from _ where _ like _ | select lessons.lesson_id from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn' and nickname like '%s%'
### Instruction:

Convert text to sql: How many lessons taught by staff whose first name has letter 'a' in it? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select count ( _ ) from _ where _ like _ | select count ( * ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name like '%a%'
### Instruction:

Convert text to sql: How many lessons were taught by a staff member whose first name has the letter 'a' in it? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select count ( _ ) from _ where _ like _ | select count ( * ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name like '%a%'
### Instruction:

Convert text to sql: How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | 

### Response:

select sum ( _ ) from _ where _ | select sum ( lesson_time ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'