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

Convert text to sql: Who are the ministers and what parties do they belong to, listed descending by the times they took office? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select minister , party_name from party order by took_office desc

### Instruction:

Convert text to sql: Return the minister who left office at the latest time. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select minister from party order by left_office desc limit 1

### Instruction:

Convert text to sql: Which minister left office the latest? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select minister from party order by left_office desc limit 1

### Instruction:

Convert text to sql: List member names and their party names. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member.member_name , party.party_name from member join party on member.party_id = party.party_id
### Instruction:

Convert text to sql: What are the names of members and their corresponding parties? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member.member_name , party.party_name from member join party on member.party_id = party.party_id

### Instruction:

Convert text to sql: Show all party names and the number of members in each party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name , count ( * ) from member join party on member.party_id = party.party_id group by member.party_id

### Instruction:

Convert text to sql: How many members are in each party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name , count ( * ) from member join party on member.party_id = party.party_id group by member.party_id

### Instruction:

Convert text to sql: What is the name of party with most number of members? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name from member join party on member.party_id = party.party_id group by member.party_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Return the name of the party with the most members. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name from member join party on member.party_id = party.party_id group by member.party_id order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show all party names and their region names. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name , region.region_name from party join region on party.region_id = region.region_id

### Instruction:

Convert text to sql: What are the names of parties and their respective regions? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name , region.region_name from party join region on party.region_id = region.region_id

### Instruction:

Convert text to sql: Show names of parties that does not have any members. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party_name from party where party_id not in ( select party_id from member )
### Instruction:

Convert text to sql: What are the names of parties that have no members? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party_name from party where party_id not in ( select party_id from member )

### Instruction:

Convert text to sql: Show the member names which are in both the party with id 3 and the party with id 1. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1

### Instruction:

Convert text to sql: Which member names are shared among members in the party with the id 3 and the party with the id 1? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1

### Instruction:

Convert text to sql: Show member names that are not in the Progress Party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member.member_name from member join party on member.party_id = party.party_id where party.party_name != 'Progress Party'
### Instruction:

Convert text to sql: Which member names corresponding to members who are not in the Progress Party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member.member_name from member join party on member.party_id = party.party_id where party.party_name != 'Progress Party'

### Instruction:

Convert text to sql: How many party events do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select count ( * ) from party_events

### Instruction:

Convert text to sql: Count the number of party events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select count ( * ) from party_events

### Instruction:

Convert text to sql: Show party names and the number of events for each party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name , count ( * ) from party_events join party on party_events.party_id = party.party_id group by party_events.party_id
### Instruction:

Convert text to sql: How many events are there for each party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name , count ( * ) from party_events join party on party_events.party_id = party.party_id group by party_events.party_id

### Instruction:

Convert text to sql: Show all member names who are not in charge of any event. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member_name from member except select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id

### Instruction:

Convert text to sql: What are the names of members who are not in charge of any events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member_name from member except select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id

### Instruction:

Convert text to sql: What are the names of parties with at least 2 events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name from party_events join party on party_events.party_id = party.party_id group by party_events.party_id having count ( * ) >= 2
### Instruction:

Convert text to sql: Return the names of parties that have two or more events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select party.party_name from party_events join party on party_events.party_id = party.party_id group by party_events.party_id having count ( * ) >= 2

### Instruction:

Convert text to sql: What is the name of member in charge of greatest number of events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id group by party_events.member_in_charge_id order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Return the name of the member who is in charge of the most events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id group by party_events.member_in_charge_id order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: find the event names that have more than 2 records. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select event_name from party_events group by event_name having count ( * ) > 2
### Instruction:

Convert text to sql: Which event names were used more than twice for party events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select event_name from party_events group by event_name having count ( * ) > 2

### Instruction:

Convert text to sql: How many Annual Meeting events happened in the United Kingdom region? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select count ( * ) from region join party on region.region_id = party.region_id join party_events on party.party_id = party_events.party_id where region.region_name = 'United Kingdom' and party_events.event_name = 'Annaual Meeting'

### Instruction:

Convert text to sql: Count the number of Annual Meeting events that took place in the region of the United Kingdom. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | 

### Response:

select count ( * ) from region join party on region.region_id = party.region_id join party_events on party.party_id = party_events.party_id where region.region_name = 'United Kingdom' and party_events.event_name = 'Annaual Meeting'
### Instruction:

Convert text to sql: How many pilots are there? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | 

### Response:

select count ( * ) from pilot

### Instruction:

Convert text to sql: List the names of pilots in ascending order of rank. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | 

### Response:

select pilot_name from pilot order by rank asc

### Instruction:

Convert text to sql: What are the positions and teams of pilots? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | 

### Response:

select position , team from pilot

### Instruction:

Convert text to sql: List the distinct positions of pilots older than 30. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | 

### Response:

select distinct position from pilot where age > 30

### Instruction:

Convert text to sql: Show the names of pilots from team "Bradley" or "Fordham". | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | 

### Response:

select pilot_name from pilot where team = 'Bradley' or team = 'Fordham'

### Instruction:

Convert text to sql: What is the joined year of the pilot of the highest rank? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | 

### Response:

select join_year from pilot order by rank asc limit 1