richardr1126/spider-skeleton-context-instruct huggingface dataset:
### 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 _ | 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 _ | 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 _ , count ( _ ) from _ group by _ | 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 _ , count ( _ ) from _ group by _ | 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 _ from _ except select _ from _ | 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 _ from _ except select _ from _ | 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 _ from _ group by _ having count ( _ ) >= _ | 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 _ from _ group by _ having count ( _ ) >= _ | 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 _ from _ group by _ order by count ( _ ) desc limit _ | 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 _ from _ group by _ order by count ( _ ) desc limit _ | 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 _ from _ group by _ having count ( _ ) > _ | 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 _ from _ group by _ having count ( _ ) > _ | 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 _ where _ | 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 _ where _ | 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 _ | 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 _ from _ order by _ asc | 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 _ from _ | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ order by _ asc limit _ | select join_year from pilot order by rank asc limit 1
### Instruction:

Convert text to sql: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | 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 _ group by _ | select nationality , count ( * ) from pilot group by nationality
### Instruction:

Convert text to sql: Show the most common nationality 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 _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from pilot group by nationality order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | 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 _ from _ where _ intersect select _ from _ where _ | select position from pilot where join_year < 2000 intersect select position from pilot where join_year > 2005
### Instruction:

Convert text to sql: Show the names of pilots and models of aircrafts they have flied with. | 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 _ from _ | select pilot.pilot_name , aircraft.model from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id
### Instruction:

Convert text to sql: Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | 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 _ from _ order by _ asc | select pilot.pilot_name , aircraft.fleet_series from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id order by pilot.rank asc
### Instruction:

Convert text to sql: Show the fleet series of the aircrafts flied by pilots younger than 34 | 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 _ from _ where _ | select aircraft.fleet_series from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id where pilot.age < 34
### Instruction:

Convert text to sql: Show the names of pilots and the number of records they have. | 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 _ group by _ | select pilot.pilot_name , count ( * ) from pilot_record join pilot on pilot_record.pilot_id = pilot.pilot_id group by pilot.pilot_name
### Instruction:

Convert text to sql: Show names of pilots that have more than one record. | 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 _ group by _ having count ( _ ) > _ | select pilot.pilot_name , count ( * ) from pilot_record join pilot on pilot_record.pilot_id = pilot.pilot_id group by pilot.pilot_name having count ( * ) > 1
### Instruction:

Convert text to sql: List the names of pilots that do not have any record. | 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 _ from _ where _ not in ( select _ from _ ) | select pilot_name from pilot where pilot_id not in ( select pilot_id from pilot_record )
### Instruction:

Convert text to sql: What document status codes do we have? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ from _ | select document_status_code from ref_document_status
### Instruction:

Convert text to sql: What is the description of document status code 'working'? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ from _ where _ | select document_status_description from ref_document_status where document_status_code = 'working'