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

Convert text to sql: How many fault status codes are recorded in the fault log parts table? | 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 distinct _ from _ | select distinct fault_status from fault_log_parts
### Instruction:

Convert text to sql: Which engineers have never visited to maintain the assets? List the engineer first name and last name. | 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 first_name , last_name from maintenance_engineers where engineer_id not in ( select engineer_id from engineer_visits )
### Instruction:

Convert text to sql: List the asset id, details, make and model for every asset. | 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 _ | select asset_id , asset_details , asset_make , asset_model from assets
### Instruction:

Convert text to sql: When was the first asset acquired? | 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 _ order by _ asc limit _ | select asset_acquired_date from assets order by asset_acquired_date asc limit 1
### Instruction:

Convert text to sql: Which part fault requires the most number of skills to fix? List part id and name. | 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 _ group by _ order by count ( _ ) desc limit _ | select parts.part_id , parts.part_name from parts join part_faults on parts.part_id = part_faults.part_id join skills_required_to_fix on part_faults.part_fault_id = skills_required_to_fix.part_fault_id group by parts.part_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which kind of part has the least number of faults? List the part name. | 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 _ group by _ order by count ( _ ) asc limit _ | select parts.part_name from parts join part_faults on parts.part_id = part_faults.part_id group by parts.part_name order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name. | 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 _ group by _ order by count ( _ ) asc limit _ | select maintenance_engineers.engineer_id , maintenance_engineers.first_name , maintenance_engineers.last_name from maintenance_engineers join engineer_visits on maintenance_engineers.engineer_id = engineer_visits.engineer_id group by maintenance_engineers.engineer_id order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Which staff have contacted which engineers? List the staff name and the engineer first name and last name. | 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 _ | select staff.staff_name , maintenance_engineers.first_name , maintenance_engineers.last_name from staff join engineer_visits on staff.staff_id = engineer_visits.contact_staff_id join maintenance_engineers on engineer_visits.engineer_id = maintenance_engineers.engineer_id