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

Convert text to sql: Which fault log included the most number of faulty parts? List the fault log id, description and record time. | 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 fault_log.fault_log_entry_id , fault_log.fault_description , fault_log.fault_log_entry_datetime from fault_log join fault_log_parts on fault_log.fault_log_entry_id = fault_log_parts.fault_log_entry_id group by fault_log.fault_log_entry_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which skill is used in fixing the most number of faults? List the skill id and description. | 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 skills.skill_id , skills.skill_description from skills join skills_required_to_fix on skills.skill_id = skills_required_to_fix.skill_id group by skills.skill_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are all the distinct asset models? | 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 asset_model from assets
### Instruction:

Convert text to sql: List the all the assets make, model, details by the disposed date ascendingly. | 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 | select asset_make , asset_model , asset_details from assets order by asset_disposed_date asc
### Instruction:

Convert text to sql: Which part has the least chargeable amount? List the part id and amount. | 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 part_id , chargeable_amount from parts order by chargeable_amount asc limit 1
### Instruction:

Convert text to sql: Which company started the earliest the maintenance contract? Show the company 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 _ order by _ asc limit _ | select third_party_companies.company_name from third_party_companies join maintenance_contracts on third_party_companies.company_id = maintenance_contracts.maintenance_contract_company_id order by maintenance_contracts.contract_start_date asc limit 1
### Instruction:

Convert text to sql: What is the type of the company who concluded its contracts most recently? | 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 _ desc limit _ | select third_party_companies.company_type from third_party_companies join maintenance_contracts on third_party_companies.company_id = maintenance_contracts.maintenance_contract_company_id order by maintenance_contracts.contract_end_date desc limit 1
### Instruction:

Convert text to sql: Which gender makes up the majority of the staff? | 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 gender from staff group by gender order by count ( * ) desc limit 1