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

Convert text to sql: How many different products correspond to each order id? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ , count ( distinct _ ) from _ group by _ | select order_id , count ( distinct product_id ) from order_items group by order_id
### Instruction:

Convert text to sql: Show order ids and the total quantity in each order. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ , sum ( _ ) from _ group by _ | select order_id , sum ( product_quantity ) from order_items group by order_id
### Instruction:

Convert text to sql: Give the order ids for all orders, as well as the total product quantity in each. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ , sum ( _ ) from _ group by _ | select order_id , sum ( product_quantity ) from order_items group by order_id
### Instruction:

Convert text to sql: How many products were not included in any order? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from products where product_id not in ( select product_id from order_items )
### Instruction:

Convert text to sql: Count the number of products that were never ordered. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from products where product_id not in ( select product_id from order_items )
### Instruction:

Convert text to sql: How many churches opened before 1850 are there? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from church where open_date < 1850
### Instruction:

Convert text to sql: Show the name, open date, and organizer for all churches. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ | select name , open_date , organized_by from church
### Instruction:

Convert text to sql: List all church names in descending order of opening date. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ order by _ desc | select name from church order by open_date desc
### Instruction:

Convert text to sql: Show the opening year in whcih at least two churches opened. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select open_date from church group by open_date having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the organizer and name for churches that opened between 1830 and 1840. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ between _ and _ | select organized_by , name from church where open_date between 1830 and 1840
### Instruction:

Convert text to sql: Show all opening years and the number of churches that opened in that year. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select open_date , count ( * ) from church group by open_date
### Instruction:

Convert text to sql: Show the name and opening year for three churches that opened most recently. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ order by _ desc limit _ | select name , open_date from church order by open_date desc limit 3
### Instruction:

Convert text to sql: How many female people are older than 30 in our record? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from people where is_male = 'F' and age > 30
### Instruction:

Convert text to sql: Show the country where people older than 30 and younger than 25 are from. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select country from people where age < 25 intersect select country from people where age > 30
### Instruction:

Convert text to sql: Show the minimum, maximum, and average age for all people. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( age ) , max ( age ) , avg ( age ) from people
### Instruction:

Convert text to sql: Show the name and country for all people whose age is smaller than the average. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ < ( select avg ( _ ) from _ ) | select name , country from people where age < ( select avg ( age ) from people )
### Instruction:

Convert text to sql: Show the pair of male and female names in all weddings after year 2014 | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ | select people.name , people.name from wedding join people on wedding.male_id = people.people_id join people on wedding.female_id = people.people_id where wedding.year > 2014
### Instruction:

Convert text to sql: Show the name and age for all male people who don't have a wedding. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name , age from people where is_male = 'T' and people_id not in ( select male_id from wedding )
### Instruction:

Convert text to sql: Show all church names except for those that had a wedding in year 2015. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ except select _ from _ where _ | select name from church except select church.name from church join wedding on church.church_id = wedding.church_id where wedding.year = 2015
### Instruction:

Convert text to sql: Show all church names that have hosted least two weddings. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select church.name from church join wedding on church.church_id = wedding.church_id group by church.church_id having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the names for all females from Canada having a wedding in year 2016. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ | select people.name from wedding join people on wedding.female_id = people.people_id where wedding.year = 2016 and people.is_male = 'F' and people.country = 'Canada'
### Instruction:

Convert text to sql: How many weddings are there in year 2016? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from wedding where year = 2016
### Instruction:

Convert text to sql: Show the church names for the weddings of all people older than 30. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ from _ where _ | select church.name from wedding join people on wedding.male_id = people.people_id join people on wedding.female_id = people.people_id join church on church.church_id = wedding.church_id where people.age > 30 or people.age > 30
### Instruction:

Convert text to sql: Show all countries and the number of people from each country. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select country , count ( * ) from people group by country
### Instruction:

Convert text to sql: How many churches have a wedding in year 2016? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | 

### Response:

select count ( distinct _ ) from _ where _ | select count ( distinct church_id ) from wedding where year = 2016
### Instruction:

Convert text to sql: How many artists do we have? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

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

Convert text to sql: Count the number of artists. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

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

Convert text to sql: Show all artist name, age, and country ordered by the yeared they joined. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select _ from _ order by _ asc | select name , age , country from artist order by year_join asc
### Instruction:

Convert text to sql: What are the names, ages, and countries of artists, sorted by the year they joined? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select _ from _ order by _ asc | select name , age , country from artist order by year_join asc
### Instruction:

Convert text to sql: What are all distinct country for artists? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select distinct _ from _ | select distinct country from artist
### Instruction:

Convert text to sql: Return the different countries for artists. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select distinct _ from _ | select distinct country from artist
### Instruction:

Convert text to sql: Show all artist names and the year joined who are not from United States. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | 

### Response:

select _ from _ where _ | select name , year_join from artist where country != 'United States'