richardr1126/spider-context-instruct huggingface dataset:
### 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 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 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 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 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 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 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 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 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 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 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 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 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 ( 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 ( settlement_amount ) , min ( settlement_amount ) from settlements
### Instruction:

Convert text to sql: List all the customers in increasing order of IDs. | 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 customer_id , customer_name from customers order by customer_id asc

### Instruction:

Convert text to sql: What is the ordered list of customer ids? | 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 customer_id , customer_name from customers order by customer_id asc
### Instruction:

Convert text to sql: Retrieve the open and close dates of all the policies associated with the customer 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 customers_policies.date_opened , customers_policies.date_closed from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name like '%Diana%'

### Instruction:

Convert text to sql: What are the open and close dates of all the policies used by the customer 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 customers_policies.date_opened , customers_policies.date_closed from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name like '%Diana%'
### Instruction:

Convert text to sql: How many kinds of enzymes are there? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( * ) from enzyme

### Instruction:

Convert text to sql: What is the total count of enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( * ) from enzyme

### Instruction:

Convert text to sql: List the name of enzymes in descending lexicographical order. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name from enzyme order by name desc

### Instruction:

Convert text to sql: What are the names of enzymes in descending order? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name from enzyme order by name desc

### Instruction:

Convert text to sql: List the names and the locations that the enzymes can make an effect. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name , location from enzyme

### Instruction:

Convert text to sql: What are the names and locations of all enzymes listed? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name , location from enzyme