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

Convert text to sql: List the most common type of artworks. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select type from artwork group by type order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: List the year in which there are more than one festivals. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select year from festival_detail group by year having count ( * ) > 1
### Instruction:

Convert text to sql: List the name of artworks that are not nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from artwork where artwork_id not in ( select artwork_id from nomination )
### Instruction:

Convert text to sql: Show the number of audience in year 2008 or 2010. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | 

### Response:

select _ from _ where _ | select num_of_audience from festival_detail where year = 2008 or year = 2010
### Instruction:

Convert text to sql: What are the total number of the audiences who visited any of the festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | 

### Response:

select sum ( _ ) from _ | select sum ( num_of_audience ) from festival_detail
### Instruction:

Convert text to sql: In which year are there festivals both inside the 'United States' and outside the 'United States'? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select year from festival_detail where location = 'United States' intersect select year from festival_detail where location != 'United States'
### Instruction:

Convert text to sql: How many premises are there? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from premises
### Instruction:

Convert text to sql: What are all the distinct premise types? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select distinct _ from _ | select distinct premises_type from premises
### Instruction:

Convert text to sql: Find the types and details for all premises and order by the premise type. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ order by _ asc | select premises_type , premise_details from premises order by premises_type asc
### Instruction:

Convert text to sql: Show each premise type and the number of premises in that type. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select premises_type , count ( * ) from premises group by premises_type
### Instruction:

Convert text to sql: Show all distinct product categories along with the number of mailshots in each category. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select product_category , count ( * ) from mailshot_campaigns group by product_category
### Instruction:

Convert text to sql: Show the name and phone of the customer without any mailshot. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select customer_name , customer_phone from customers where customer_id not in ( select customer_id from mailshot_customers )
### Instruction:

Convert text to sql: Show the name and phone for customers with a mailshot with outcome code 'No Response'. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ where _ | select customers.customer_name , customers.customer_phone from customers join mailshot_customers on customers.customer_id = mailshot_customers.customer_id where mailshot_customers.outcome_code = 'No Response'
### Instruction:

Convert text to sql: Show the outcome code of mailshots along with the number of mailshots in each outcome code. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select outcome_code , count ( * ) from mailshot_customers group by outcome_code
### Instruction:

Convert text to sql: Show the names of customers who have at least 2 mailshots with outcome code 'Order'. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ where _ group by _ having count ( _ ) >= _ | select customers.customer_name from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where outcome_code = 'Order' group by mailshot_customers.customer_id having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the names of customers who have the most mailshots. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id group by mailshot_customers.customer_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select customers.customer_name , customers.payment_method from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where mailshot_customers.outcome_code = 'Order' intersect select customers.customer_name , customers.payment_method from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where mailshot_customers.outcome_code = 'No Response'
### Instruction:

Convert text to sql: Show the premise type and address type code for all customer addresses. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select _ from _ | select premises.premises_type , customer_addresses.address_type_code from customer_addresses join premises on customer_addresses.premise_id = premises.premise_id
### Instruction:

Convert text to sql: What are the distinct address type codes for all customer addresses? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | 

### Response:

select distinct _ from _ | select distinct address_type_code from customer_addresses