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

Convert text to sql: Which country does customer with first name as Carole and last name as Bernhard lived in? | 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 addresses.country 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: What is the country in which the customer Carole Bernhard lived? | 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 addresses.country 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: What is zip code of customer with first name as Carole and last name as 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 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: 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 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 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 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 ( 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 ( 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 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 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 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 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 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 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 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 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 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 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%'