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

Convert text to sql: What are the title and maximum price of each film? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ , max ( _ ) from _ group by _ | select film.title , max ( schedule.price ) from schedule join film on schedule.film_id = film.film_id group by schedule.film_id
### Instruction:

Convert text to sql: Give me the title and highest price for each film. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ , max ( _ ) from _ group by _ | select film.title , max ( schedule.price ) from schedule join film on schedule.film_id = film.film_id group by schedule.film_id
### Instruction:

Convert text to sql: Show cinema name, film title, date, and price for each record in schedule. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ from _ | select cinema.name , film.title , schedule.date , schedule.price from schedule join film on schedule.film_id = film.film_id join cinema on schedule.cinema_id = cinema.cinema_id
### Instruction:

Convert text to sql: What are the title and director of the films without any schedule? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select title , directed_by from film where film_id not in ( select film_id from schedule )
### Instruction:

Convert text to sql: Show director with the largest number of show times in total. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ from _ group by _ order by sum ( _ ) desc limit _ | select film.directed_by from schedule join film on schedule.film_id = film.film_id group by film.directed_by order by sum ( schedule.show_times_per_day ) desc limit 1
### Instruction:

Convert text to sql: Find the locations that have more than one movie theater with capacity above 300. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ from _ where _ group by _ having count ( _ ) > _ | select location from cinema where capacity > 300 group by location having count ( * ) > 1
### Instruction:

Convert text to sql: In which locations are there more than one movie theater with capacity above 300? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select _ from _ where _ group by _ having count ( _ ) > _ | select location from cinema where capacity > 300 group by location having count ( * ) > 1
### Instruction:

Convert text to sql: How many films have the word 'Dummy' in their titles? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select count ( _ ) from _ where _ like _ | select count ( * ) from film where title like '%Dummy%'
### Instruction:

Convert text to sql: Count the number of films whose title contains the word 'Dummy'. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | 

### Response:

select count ( _ ) from _ where _ like _ | select count ( * ) from film where title like '%Dummy%'
### Instruction:

Convert text to sql: Are the customers holding coupons with amount 500 bad or good? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ where _ | select customers.good_or_bad_customer from customers join discount_coupons on customers.coupon_id = discount_coupons.coupon_id where discount_coupons.coupon_amount = 500
### Instruction:

Convert text to sql: How many bookings did each customer make? List the customer id, first name, and the count. | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select customers.customer_id , customers.first_name , count ( * ) from customers join bookings on customers.customer_id = bookings.customer_id group by customers.customer_id
### Instruction:

Convert text to sql: What is the maximum total amount paid by a customer? List the customer id and amount. | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select customer_id , sum ( amount_paid ) from payments group by customer_id order by sum ( amount_paid ) desc limit 1
### Instruction:

Convert text to sql: What are the id and the amount of refund of the booking that incurred the most times of payments? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select bookings.booking_id , bookings.amount_of_refund from bookings join payments on bookings.booking_id = payments.booking_id group by bookings.booking_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the id of the product that is booked for 3 times? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ group by _ having count ( _ ) = _ | select product_id from products_booked group by product_id having count ( * ) = 3
### Instruction:

Convert text to sql: What is the product description of the product booked with an amount of 102.76? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ where _ | select products_for_hire.product_description from products_booked join products_for_hire on products_booked.product_id = products_for_hire.product_id where products_booked.booked_amount = 102.76
### Instruction:

Convert text to sql: What are the start date and end date of the booking that has booked the product named 'Book collection A'? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ where _ | select bookings.booking_start_date , bookings.booking_end_date from products_for_hire join products_booked on products_for_hire.product_id = products_booked.product_id join bookings on products_booked.booking_id = bookings.booking_id where products_for_hire.product_name = 'Book collection A'
### Instruction:

Convert text to sql: What are the names of products whose availability equals to 1? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ where _ | select products_for_hire.product_name from view_product_availability join products_for_hire on view_product_availability.product_id = products_for_hire.product_id where view_product_availability.available_yn = 1
### Instruction:

Convert text to sql: How many different product types are there? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct product_type_code ) from products_for_hire
### Instruction:

Convert text to sql: What are the first name, last name, and gender of all the good customers? Order by their last name. | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select _ from _ where _ order by _ asc | select first_name , last_name , gender_mf from customers where good_or_bad_customer = 'good' order by last_name asc
### Instruction:

Convert text to sql: What is the average amount due for all the payments? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | 

### Response:

select avg ( _ ) from _ | select avg ( amount_due ) from payments