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

Convert text to sql: How many hosts does each nationality have? List the nationality and the count. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select nationality , count ( * ) from host group by nationality
### Instruction:

Convert text to sql: Show the most common nationality of hosts. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

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

Convert text to sql: Which nationality has the most hosts? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

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

Convert text to sql: Show the nations that have both hosts older than 45 and hosts younger than 35. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select nationality from host where age > 45 intersect select nationality from host where age < 35
### Instruction:

Convert text to sql: Which nations have both hosts of age above 45 and hosts of age below 35? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select nationality from host where age > 45 intersect select nationality from host where age < 35
### Instruction:

Convert text to sql: Show the themes of parties and the names of the party hosts. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ | select party.party_theme , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id
### Instruction:

Convert text to sql: For each party, return its theme and the name of its host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ | select party.party_theme , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id
### Instruction:

Convert text to sql: Show the locations of parties and the names of the party hosts in ascending order of the age of the host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ order by _ asc | select party.location , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id order by host.age asc
### Instruction:

Convert text to sql: For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ order by _ asc | select party.location , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id order by host.age asc
### Instruction:

Convert text to sql: Show the locations of parties with hosts older than 50. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ | select party.location from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where host.age > 50
### Instruction:

Convert text to sql: Which parties have hosts of age above 50? Give me the party locations. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ | select party.location from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where host.age > 50
### Instruction:

Convert text to sql: Show the host names for parties with number of hosts greater than 20. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ | select host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where party.number_of_hosts > 20
### Instruction:

Convert text to sql: Which parties have more than 20 hosts? Give me the host names for these parties. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ | select host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where party.number_of_hosts > 20
### Instruction:

Convert text to sql: Show the name and the nationality of the oldest host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ order by _ desc limit _ | select name , nationality from host order by age desc limit 1
### Instruction:

Convert text to sql: What are the name and the nationality of the host of the highest age? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ order by _ desc limit _ | select name , nationality from host order by age desc limit 1
### Instruction:

Convert text to sql: List the names of hosts who did not serve as a host of any party in our record. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from host where host_id not in ( select host_id from party_host )
### Instruction:

Convert text to sql: What are the names of hosts who did not host any party in our record? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from host where host_id not in ( select host_id from party_host )
### Instruction:

Convert text to sql: How many regions do we have? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

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

Convert text to sql: Count the number of regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

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

Convert text to sql: Show all region code and region name sorted by the codes. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ order by _ asc | select region_code , region_name from region order by region_code asc
### Instruction:

Convert text to sql: What are the codes and names for all regions, sorted by codes? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ order by _ asc | select region_code , region_name from region order by region_code asc
### Instruction:

Convert text to sql: List all region names in alphabetical order. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ order by _ asc | select region_name from region order by region_name asc
### Instruction:

Convert text to sql: What are the names of the regions in alphabetical order? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ order by _ asc | select region_name from region order by region_name asc
### Instruction:

Convert text to sql: Show names for all regions except for Denmark. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ where _ | select region_name from region where region_name != 'Denmark'
### Instruction:

Convert text to sql: Return the names of all regions other than Denmark. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ where _ | select region_name from region where region_name != 'Denmark'
### Instruction:

Convert text to sql: How many storms had death records? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from storm where number_deaths > 0
### Instruction:

Convert text to sql: Count the number of storms in which at least 1 person died. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from storm where number_deaths > 0
### Instruction:

Convert text to sql: List name, dates active, and number of deaths for all storms with at least 1 death. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ where _ | select name , dates_active , number_deaths from storm where number_deaths >= 1
### Instruction:

Convert text to sql: What are the names, dates active, and number of deaths for storms that had 1 or more death? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ where _ | select name , dates_active , number_deaths from storm where number_deaths >= 1
### Instruction:

Convert text to sql: Show the average and maximum damage for all storms with max speed higher than 1000. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select avg ( _ ) , max ( _ ) from _ where _ | select avg ( damage_millions_usd ) , max ( damage_millions_usd ) from storm where max_speed > 1000
### Instruction:

Convert text to sql: What is the average and maximum damage in millions for storms that had a max speed over 1000? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select avg ( _ ) , max ( _ ) from _ where _ | select avg ( damage_millions_usd ) , max ( damage_millions_usd ) from storm where max_speed > 1000
### Instruction:

Convert text to sql: What is the total number of deaths and damage for all storms with a max speed greater than the average? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select sum ( _ ) , sum ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select sum ( number_deaths ) , sum ( damage_millions_usd ) from storm where max_speed > ( select avg ( max_speed ) from storm )
### Instruction:

Convert text to sql: Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select sum ( _ ) , sum ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select sum ( number_deaths ) , sum ( damage_millions_usd ) from storm where max_speed > ( select avg ( max_speed ) from storm )
### Instruction:

Convert text to sql: List name and damage for all storms in a descending order of max speed. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ order by _ desc | select name , damage_millions_usd from storm order by max_speed desc
### Instruction:

Convert text to sql: What are the names and damage in millions for storms, ordered by their max speeds descending? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ order by _ desc | select name , damage_millions_usd from storm order by max_speed desc
### Instruction:

Convert text to sql: How many regions are affected? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct region_id ) from affected_region
### Instruction:

Convert text to sql: Count the number of different affected regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct region_id ) from affected_region
### Instruction:

Convert text to sql: Show the name for regions not affected. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select region_name from region where region_id not in ( select region_id from affected_region )
### Instruction:

Convert text to sql: What are the names of regions that were not affected? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select region_name from region where region_id not in ( select region_id from affected_region )
### Instruction:

Convert text to sql: Show the name for regions and the number of storms for each region. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select region.region_name , count ( * ) from region join affected_region on region.region_id = affected_region.region_id group by region.region_id
### Instruction:

Convert text to sql: How many storms occured in each region? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select region.region_name , count ( * ) from region join affected_region on region.region_id = affected_region.region_id group by region.region_id
### Instruction:

Convert text to sql: List the name for storms and the number of affected regions for each storm. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select storm.name , count ( * ) from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id
### Instruction:

Convert text to sql: How many regions were affected by each storm? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select storm.name , count ( * ) from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id
### Instruction:

Convert text to sql: What is the storm name and max speed which affected the greatest number of regions? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select storm.name , storm.max_speed from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id order by count ( * ) desc limit 1