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

Convert text to sql: Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ order by _ asc limit _ | select amount_settled , amount_claimed from claims order by amount_settled asc limit 1
### Instruction:

Convert text to sql: Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ where _ > ( select avg ( _ ) from _ ) | select date_claim_made , date_claim_settled from claims where amount_claimed > ( select avg ( amount_claimed ) from claims )
### Instruction:

Convert text to sql: Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ where _ > ( select avg ( _ ) from _ ) | select date_claim_made , date_claim_settled from claims where amount_claimed > ( select avg ( amount_claimed ) from claims )
### Instruction:

Convert text to sql: Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ where _ <= ( select avg ( _ ) from _ ) | select date_claim_made from claims where amount_settled <= ( select avg ( amount_settled ) from claims )
### Instruction:

Convert text to sql: Return the claim start date for the claims whose claimed amount is no more than the average | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ where _ <= ( select avg ( _ ) from _ ) | select date_claim_made from claims where amount_settled <= ( select avg ( amount_settled ) from claims )
### Instruction:

Convert text to sql: How many settlements does each claim correspond to? List the claim id and the number of settlements. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select claims.claim_id , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id
### Instruction:

Convert text to sql: Find the number of settlements each claim corresponds to. Show the number together with the claim id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select claims.claim_id , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id
### Instruction:

Convert text to sql: Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select claims.claim_id , claims.date_claim_made , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select claims.claim_id , claims.date_claim_made , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select count ( _ ) , _ from _ group by _ order by _ desc limit _ | select count ( * ) , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by claims.date_claim_settled desc limit 1
### Instruction:

Convert text to sql: Find the claim id and the number of settlements made for the claim with the most recent settlement date. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select count ( _ ) , _ from _ group by _ order by _ desc limit _ | select count ( * ) , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by claims.date_claim_settled desc limit 1
### Instruction:

Convert text to sql: Of all the claims, what was the earliest date when any claim was made? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ order by _ asc limit _ | select date_claim_made from claims order by date_claim_made asc limit 1
### Instruction:

Convert text to sql: Tell me the the date when the first claim was made. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ order by _ asc limit _ | select date_claim_made from claims order by date_claim_made asc limit 1
### Instruction:

Convert text to sql: What is the total amount of settlement made for all the settlements? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select sum ( _ ) from _ | select sum ( amount_settled ) from settlements
### Instruction:

Convert text to sql: Compute the total amount of settlement across all the settlements. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select sum ( _ ) from _ | select sum ( amount_settled ) from settlements
### Instruction:

Convert text to sql: Who are the customers that had more than 1 policy? List the customer details and id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id group by customers.customer_id having count ( * ) > 1
### Instruction:

Convert text to sql: Find the the customer details and id for the customers who had more than one policy. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id group by customers.customer_id having count ( * ) > 1
### Instruction:

Convert text to sql: What are the claim dates and settlement dates of all the settlements? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ | select date_claim_made , date_claim_settled from settlements
### Instruction:

Convert text to sql: Tell me the the claim date and settlement date for each settlement case. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ | select date_claim_made , date_claim_settled from settlements
### Instruction:

Convert text to sql: What is the most popular payment method? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which payment method is used the most often? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: With which kind of payment method were the least number of payments processed? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What is the payment method that were used the least often? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What is the total amount of payment? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select sum ( _ ) from _ | select sum ( amount_payment ) from payments
### Instruction:

Convert text to sql: Compute the total amount of payment processed. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | 

### Response:

select sum ( _ ) from _ | select sum ( amount_payment ) from payments