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

Convert text to sql: How much amount in total were claimed in the most recently created document? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select sum ( _ ) from _ where _ = ( select _ from _ order by _ asc limit _ ) | select sum ( claim_headers.amount_claimed ) from claim_headers join claims_documents on claim_headers.claim_header_id = claims_documents.claim_id where claims_documents.created_date = ( select created_date from claims_documents order by created_date asc limit 1 )
### Instruction:

Convert text to sql: What is the name of the customer who has made the largest amount of claim in a single claim? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_claimed = ( select max ( amount_claimed ) from claim_headers )
### Instruction:

Convert text to sql: Which customer made the largest amount of claim in a single claim? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_claimed = ( select max ( amount_claimed ) from claim_headers )
### Instruction:

Convert text to sql: What is the name of the customer who has made the minimum amount of payment in one claim? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ = ( select min ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_piad = ( select min ( amount_piad ) from claim_headers )
### Instruction:

Convert text to sql: Which customer made the smallest amount of claim in one claim? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ = ( select min ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_piad = ( select min ( amount_piad ) from claim_headers )
### Instruction:

Convert text to sql: Find the names of customers who have no policies associated. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ except select _ from _ | select customer_details from customers except select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id
### Instruction:

Convert text to sql: What are the names of customers who do not have any policies? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ except select _ from _ | select customer_details from customers except select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id
### Instruction:

Convert text to sql: How many claim processing stages are there in total? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from claims_processing_stages
### Instruction:

Convert text to sql: Find the number of distinct stages in claim processing. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from claims_processing_stages
### Instruction:

Convert text to sql: What is the name of the claim processing stage that most of the claims are on? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select claims_processing_stages.claim_status_name from claims_processing join claims_processing_stages on claims_processing.claim_stage_id = claims_processing_stages.claim_stage_id group by claims_processing.claim_stage_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which claim processing stage has the most claims? Show the claim status name. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select claims_processing_stages.claim_status_name from claims_processing join claims_processing_stages on claims_processing.claim_stage_id = claims_processing_stages.claim_stage_id group by claims_processing.claim_stage_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the names of customers whose name contains "Diana". | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ like _ | select customer_details from customers where customer_details like '%Diana%'
### Instruction:

Convert text to sql: Which customers have the substring "Diana" in their names? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ like _ | select customer_details from customers where customer_details like '%Diana%'
### Instruction:

Convert text to sql: Find the names of the customers who have an deputy policy. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy'
### Instruction:

Convert text to sql: Which customers have an insurance policy with the type code "Deputy"? Give me the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy'
### Instruction:

Convert text to sql: Find the names of customers who either have an deputy policy or uniformed policy. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy' or policies.policy_type_code = 'Uniform'
### Instruction:

Convert text to sql: Which customers have an insurance policy with the type code "Deputy" or "Uniform"? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy' or policies.policy_type_code = 'Uniform'
### Instruction:

Convert text to sql: Find the names of all the customers and staff members. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ union select _ from _ | select customer_details from customers union select staff_details from staff
### Instruction:

Convert text to sql: What are the names of the customers and staff members? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ union select _ from _ | select customer_details from customers union select staff_details from staff