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

Convert text to sql: What is the average price for products? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select avg ( _ ) from _ | select avg ( product_price ) from products
### Instruction:

Convert text to sql: What is the name of the product with the highest price? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ from _ order by _ desc limit _ | select product_name from products order by product_price desc limit 1
### Instruction:

Convert text to sql: Show different type codes of products and the number of products with each type code. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select product_type_code , count ( * ) from products group by product_type_code
### Instruction:

Convert text to sql: Show the most common type code across products. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

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

Convert text to sql: Show the product type codes that have at least two products. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

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

Convert text to sql: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select product_type_code from products where product_price > 4500 intersect select product_type_code from products where product_price < 3000
### Instruction:

Convert text to sql: Show the names of products and the number of events they are in. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name
### Instruction:

Convert text to sql: Show the names of products and the number of events they are in, sorted by the number of events in descending order. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select products.product_name , count ( * ) from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name order by count ( * ) desc
### Instruction:

Convert text to sql: Show the names of products that are in at least two events. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select products.product_name from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the names of products that are in at least two events in ascending alphabetical order of product name. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ order by _ asc | select products.product_name from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name having count ( * ) >= 2 order by products.product_name asc
### Instruction:

Convert text to sql: List the names of products that are not in any event. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select product_name from products where product_id not in ( select product_id from products_in_events )
### Instruction:

Convert text to sql: How many artworks are there? | 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 count ( _ ) from _ | select count ( * ) from artwork
### Instruction:

Convert text to sql: List the name of artworks in ascending alphabetical order. | 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 _ order by _ asc | select name from artwork order by name asc
### Instruction:

Convert text to sql: List the name of artworks whose type is not "Program Talent Show". | 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 name from artwork where type != 'Program Talent Show'
### Instruction:

Convert text to sql: What are the names and locations of 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 _ | select festival_name , location from festival_detail
### Instruction:

Convert text to sql: What are the names of the chairs of festivals, sorted in ascending order of the year held? | 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 _ order by _ asc | select chair_name from festival_detail order by year asc
### Instruction:

Convert text to sql: What is the location of the festival with the largest number of audience? | 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 _ order by _ desc limit _ | select location from festival_detail order by num_of_audience desc limit 1
### Instruction:

Convert text to sql: What are the names of festivals held in year 2007? | 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 festival_name from festival_detail where year = 2007
### Instruction:

Convert text to sql: What is the average number of audience for 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 avg ( _ ) from _ | select avg ( num_of_audience ) from festival_detail
### Instruction:

Convert text to sql: Show the names of the three most recent 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 _ order by _ desc limit _ | select festival_name from festival_detail order by year desc limit 3
### Instruction:

Convert text to sql: For each nomination, show the name of the artwork and name of the festival where it is 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 _ | select artwork.name , festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id
### Instruction:

Convert text to sql: Show distinct types of artworks that are nominated in festivals in 2007. | 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 distinct _ from _ where _ | select distinct artwork.type from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id where festival_detail.year = 2007
### Instruction:

Convert text to sql: Show the names of artworks in ascending order of the year they are nominated in. | 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 _ order by _ asc | select artwork.name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id order by festival_detail.year asc
### Instruction:

Convert text to sql: Show the names of festivals that have nominated artworks of type "Program Talent Show". | 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 festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id where artwork.type = 'Program Talent Show'
### Instruction:

Convert text to sql: Show the ids and names of festivals that have at least two nominations for 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 _ having count ( _ ) >= _ | select nomination.festival_id , festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id group by nomination.festival_id having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the id, name of each festival and the number of artworks it has 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 _ , count ( _ ) from _ group by _ | select nomination.festival_id , festival_detail.festival_name , count ( * ) from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id group by nomination.festival_id
### Instruction:

Convert text to sql: Please show different types of artworks with the corresponding number of artworks of each type. | 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 _ , count ( _ ) from _ group by _ | select type , count ( * ) from artwork group by type