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

Convert text to sql: Which customer uses the most policies? Give me the customer name. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are all the policy types of the customer named "Dayana Robel"? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select distinct _ from _ where _ | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = 'Dayana Robel'
### Instruction:

Convert text to sql: Tell me the types of the policy used by the customer named "Dayana Robel". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select distinct _ from _ where _ | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = 'Dayana Robel'
### Instruction:

Convert text to sql: What are all the policy types of the customer that has the most policies listed? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select distinct _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = ( select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1 )
### Instruction:

Convert text to sql: List all the policy types used by the customer enrolled in the most policies. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select distinct _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = ( select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1 )
### Instruction:

Convert text to sql: List all the services in the alphabetical order. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ order by _ asc | select service_name from services order by service_name asc
### Instruction:

Convert text to sql: Give me a list of all the service names sorted alphabetically. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ order by _ asc | select service_name from services order by service_name asc
### Instruction:

Convert text to sql: How many services are there? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

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

Convert text to sql: Count the total number of available services. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

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

Convert text to sql: Find the names of users who do not have a first notification of loss record. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ except select _ from _ | select customer_name from customers except select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id
### Instruction:

Convert text to sql: Which customers do not have a first notification of loss record? Give me the customer names. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ except select _ from _ | select customer_name from customers except select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id
### Instruction:

Convert text to sql: Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' or services.service_name = 'Upgrade a policy'
### Instruction:

Convert text to sql: Which customers have used the service named "Close a policy" or "Upgrade a policy"? Give me the customer names. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' or services.service_name = 'Upgrade a policy'
### Instruction:

Convert text to sql: Find the names of customers who have used both the service "Close a policy" and the service "New policy application". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' intersect select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'New policy application'
### Instruction:

Convert text to sql: Which customers have used both the service named "Close a policy" and the service named "Upgrade a policy"? Give me the customer names. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' intersect select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'New policy application'
### Instruction:

Convert text to sql: Find the IDs of customers whose name contains "Diana". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

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

Convert text to sql: What are the IDs of customers who have "Diana" in part of their names? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

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

Convert text to sql: What are the maximum and minimum settlement amount on record? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select max ( _ ) , min ( _ ) from _ | select max ( settlement_amount ) , min ( settlement_amount ) from settlements
### Instruction:

Convert text to sql: Find the maximum and minimum settlement amount. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | 

### Response:

select max ( _ ) , min ( _ ) from _ | select max ( settlement_amount ) , min ( settlement_amount ) from settlements