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

Convert text to sql: Return the name of the characteristic that is most common across all products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the names, details and data types of the characteristics which are never used by any product? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select _ from _ except select _ from _ | select characteristic_name , other_characteristic_details , characteristic_data_type from characteristics except select characteristics.characteristic_name , characteristics.other_characteristic_details , characteristics.characteristic_data_type from characteristics join product_characteristics on characteristics.characteristic_id = product_characteristics.characteristic_id
### Instruction:

Convert text to sql: Give the names, details, and data types of characteristics that are not found in any product. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select _ from _ except select _ from _ | select characteristic_name , other_characteristic_details , characteristic_data_type from characteristics except select characteristics.characteristic_name , characteristics.other_characteristic_details , characteristics.characteristic_data_type from characteristics join product_characteristics on characteristics.characteristic_id = product_characteristics.characteristic_id
### Instruction:

Convert text to sql: What are characteristic names used at least twice across all products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name having count ( * ) >= 2
### Instruction:

Convert text to sql: Give the names of characteristics that are in two or more products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name having count ( * ) >= 2
### Instruction:

Convert text to sql: How many colors are never used by any product? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from ref_colors where color_code not in ( select color_code from products )
### Instruction:

Convert text to sql: Count the number of colors that are not used in any products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from ref_colors where color_code not in ( select color_code from products )
### Instruction:

Convert text to sql: How many events are there? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

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

Convert text to sql: List all the event names by year from the most recent to the oldest. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ order by _ desc | select name from event order by year desc
### Instruction:

Convert text to sql: What is the name of the event that happened in the most recent year? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ order by _ desc limit _ | select name from event order by year desc limit 1
### Instruction:

Convert text to sql: How many stadiums are there? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

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

Convert text to sql: Find the name of the stadium that has the maximum capacity. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ order by _ desc limit _ | select name from stadium order by capacity desc limit 1
### Instruction:

Convert text to sql: Find the names of stadiums whose capacity is smaller than the average capacity. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ where _ < ( select avg ( _ ) from _ ) | select name from stadium where capacity < ( select avg ( capacity ) from stadium )
### Instruction:

Convert text to sql: Find the country that has the most stadiums. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

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

Convert text to sql: Which country has at most 3 stadiums listed? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ group by _ having count ( _ ) <= _ | select country from stadium group by country having count ( * ) <= 3
### Instruction:

Convert text to sql: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select country from stadium where capacity > 60000 intersect select country from stadium where capacity < 50000
### Instruction:

Convert text to sql: How many cities have a stadium that was opened before the year of 2006? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select count ( distinct _ ) from _ where _ | select count ( distinct city ) from stadium where opening_year < 2006
### Instruction:

Convert text to sql: How many stadiums does each country have? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

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

Convert text to sql: Which countries do not have a stadium that was opened after 2006? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ except select _ from _ where _ | select country from stadium except select country from stadium where opening_year > 2006
### Instruction:

Convert text to sql: How many stadiums are not in country "Russia"? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from stadium where country != 'Russia'
### Instruction:

Convert text to sql: Find the names of all swimmers, sorted by their 100 meter scores in ascending order. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ order by _ asc | select name from swimmer order by meter_100 asc
### Instruction:

Convert text to sql: How many different countries are all the swimmers from? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct nationality ) from swimmer
### Instruction:

Convert text to sql: List countries that have more than one swimmer. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select nationality , count ( * ) from swimmer group by nationality having count ( * ) > 1
### Instruction:

Convert text to sql: Find all 200 meter and 300 meter results of swimmers with nationality "Australia". | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ where _ | select meter_200 , meter_300 from swimmer where nationality = 'Australia'
### Instruction:

Convert text to sql: Find the names of swimmers who has a result of "win". | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ where _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id where result = 'Win'
### Instruction:

Convert text to sql: What is the name of the stadium which held the most events? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select stadium.name from stadium join event on stadium.id = event.stadium_id group by event.stadium_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the name and capacity of the stadium where the event named "World Junior" happened. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ where _ | select stadium.name , stadium.capacity from stadium join event on stadium.id = event.stadium_id where event.name = 'World Junior'
### Instruction:

Convert text to sql: Find the names of stadiums which have never had any event. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from stadium where id not in ( select stadium_id from event )
### Instruction:

Convert text to sql: Find the name of the swimmer who has the most records. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id group by record.swimmer_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the name of the swimmer who has at least 2 records. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id group by record.swimmer_id having count ( * ) >= 2