richardr1126/spider-context-instruct huggingface dataset:
### 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ( 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 ( 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 ( 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 ( 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 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 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 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 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 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 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 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 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 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 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 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

### Instruction:

Convert text to sql: Return the name and max speed of the storm that affected the most 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 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

### Instruction:

Convert text to sql: Show the name of storms which don't have affected region in record. | 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 name from storm where storm_id not in ( select storm_id from affected_region )

### Instruction:

Convert text to sql: What are the names of storms that did not affect any 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 name from storm where storm_id not in ( select storm_id from affected_region )
### Instruction:

Convert text to sql: Show storm name with at least two regions and 10 cities 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 storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2 intersect select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having sum ( affected_region.number_city_affected ) >= 10

### Instruction:

Convert text to sql: What are the names of storms that both affected two or more regions and affected a total of 10 or more cities? | 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 storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2 intersect select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having sum ( affected_region.number_city_affected ) >= 10

### Instruction:

Convert text to sql: Show all storm names except for those with at least two 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 name from storm except select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2

### Instruction:

Convert text to sql: What are the names of storms that did not affect two or more 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 name from storm except select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2
### Instruction:

Convert text to sql: What are the region names affected by the storm with a number of deaths of least 10? | 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 region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where storm.number_deaths >= 10

### Instruction:

Convert text to sql: Return the names of the regions affected by storms that had a death count of at least 10. | 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 region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where storm.number_deaths >= 10

### Instruction:

Convert text to sql: Show all storm names affecting region "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 storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Denmark'

### Instruction:

Convert text to sql: What are the names of the storms that affected 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 storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Denmark'

### Instruction:

Convert text to sql: Show the region name with at least two storms. | 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 region.region_name from region join affected_region on region.region_id = affected_region.region_id group by region.region_id having count ( * ) >= 2