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

Convert text to sql: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select staff.staff_name , count ( * ) from staff join engineer_visits on staff.staff_id = engineer_visits.contact_staff_id group by staff.staff_name
### Instruction:

Convert text to sql: Which assets did not incur any fault log? List the asset model. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select asset_model from assets where asset_id not in ( select asset_id from fault_log )
### Instruction:

Convert text to sql: list the local authorities and services provided by all stations. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ | select local_authority , services from station
### Instruction:

Convert text to sql: show all train numbers and names ordered by their time from early to late. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ order by _ asc | select train_number , name from train order by time asc
### Instruction:

Convert text to sql: Give me the times and numbers of all trains that go to Chennai, ordered by time. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ where _ order by _ asc | select time , train_number from train where destination = 'Chennai' order by time asc
### Instruction:

Convert text to sql: How many trains have 'Express' in their names? | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select count ( _ ) from _ where _ like _ | select count ( * ) from train where name like '%Express%'
### Instruction:

Convert text to sql: Find the number and time of the train that goes from Chennai to Guruvayur. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ where _ | select train_number , time from train where origin = 'Chennai' and destination = 'Guruvayur'
### Instruction:

Convert text to sql: Find the number of trains starting from each origin. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ , count ( _ ) from _ group by _ | select origin , count ( * ) from train group by origin
### Instruction:

Convert text to sql: Find the name of the train whose route runs through greatest number of stations. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select train.name from train join route on train.id = route.train_id group by route.train_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the number of trains for each station, as well as the station network name and services. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , station.network_name , station.services from station join route on station.id = route.station_id group by route.station_id
### Instruction:

Convert text to sql: What is the average high temperature for each day of week? | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select avg ( _ ) , _ from _ group by _ | select avg ( high_temperature ) , day_of_week from weekly_weather group by day_of_week
### Instruction:

Convert text to sql: Give me the maximum low temperature and average precipitation at the Amersham station. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select max ( _ ) , avg ( _ ) from _ where _ | select max ( weekly_weather.low_temperature ) , avg ( weekly_weather.precipitation ) from weekly_weather join station on weekly_weather.station_id = station.id where station.network_name = 'Amersham'
### Instruction:

Convert text to sql: Find names and times of trains that run through stations for the local authority Chiltern. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ where _ | select train.name , train.time from station join route on station.id = route.station_id join train on route.train_id = train.id where station.local_authority = 'Chiltern'
### Instruction:

Convert text to sql: How many different services are provided by all stations? | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct services ) from station
### Instruction:

Convert text to sql: Find the id and local authority of the station with has the highest average high temperature. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ group by _ order by avg ( _ ) desc limit _ | select station.id , station.local_authority from weekly_weather join station on weekly_weather.station_id = station.id group by weekly_weather.station_id order by avg ( high_temperature ) desc limit 1
### Instruction:

Convert text to sql: Find the id and local authority of the station whose maximum precipitation is higher than 50. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ group by _ having max ( _ ) > _ | select station.id , station.local_authority from weekly_weather join station on weekly_weather.station_id = station.id group by weekly_weather.station_id having max ( weekly_weather.precipitation ) > 50
### Instruction:

Convert text to sql: show the lowest low temperature and highest wind speed in miles per hour. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select min ( _ ) , max ( _ ) from _ | select min ( low_temperature ) , max ( wind_speed_mph ) from weekly_weather
### Instruction:

Convert text to sql: Find the origins from which more than 1 train starts. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select origin from train group by origin having count ( * ) > 1
### Instruction:

Convert text to sql: Find the number of professors in accounting department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from professor join department on professor.dept_code = department.dept_code where dept_name = 'Accounting'
### Instruction:

Convert text to sql: How many professors are in the accounting dept? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from professor join department on professor.dept_code = department.dept_code where dept_name = 'Accounting'
### Instruction:

Convert text to sql: How many professors are teaching class with code ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( distinct _ ) from _ where _ | select count ( distinct prof_num ) from class where crs_code = 'ACCT-211'
### Instruction:

Convert text to sql: How many professors teach a class with the code ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( distinct _ ) from _ where _ | select count ( distinct prof_num ) from class where crs_code = 'ACCT-211'
### Instruction:

Convert text to sql: What is the first and last name of the professor in biology department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select _ from _ where _ | select employee.emp_fname , employee.emp_lname from professor join department on professor.dept_code = department.dept_code join employee on professor.emp_num = employee.emp_num where dept_name = 'Biology'
### Instruction:

Convert text to sql: What are the first and last name of all biology professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select _ from _ where _ | select employee.emp_fname , employee.emp_lname from professor join department on professor.dept_code = department.dept_code join employee on professor.emp_num = employee.emp_num where dept_name = 'Biology'