db_id
stringlengths 4
31
| text
stringlengths 398
4.9k
|
---|---|
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the policy types more than 4 customers use. Show their type code. | 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 _ having count ( _ ) > _ | select policy_type_code from available_policies group by policy_type_code having count ( * ) > 4 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the total and average amount of settlements. | 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 sum ( _ ) , avg ( _ ) from _ | select sum ( settlement_amount ) , avg ( settlement_amount ) from settlements |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the sum and average of all settlement amounts. | 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 sum ( _ ) , avg ( _ ) from _ | select sum ( settlement_amount ) , avg ( settlement_amount ) from settlements |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name of services that have been used for more than 2 times in first notification of loss. | 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 _ having count ( _ ) > _ | select services.service_name from first_notification_of_loss join services on first_notification_of_loss.service_id = services.service_id group by first_notification_of_loss.service_id having count ( * ) > 2 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which services have been used more than twice in first notification of loss? Return the service 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 _ having count ( _ ) > _ | select services.service_name from first_notification_of_loss join services on first_notification_of_loss.service_id = services.service_id group by first_notification_of_loss.service_id having count ( * ) > 2 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the effective date of the claim that has the largest amount of total settlement? | 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 sum ( _ ) desc limit _ | select claims.effective_date from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by sum ( settlements.settlement_amount ) desc limit 1 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the claim that has the largest total settlement amount. Return the effective date of the claim. | 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 sum ( _ ) desc limit _ | select claims.effective_date from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by sum ( settlements.settlement_amount ) desc limit 1 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many policies are listed for 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 count ( _ ) from _ where _ | select count ( * ) from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name = 'Dayana Robel' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Count the total number of policies 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 count ( _ ) from _ where _ | select count ( * ) from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name = 'Dayana Robel' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the name of the customer who 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 _ 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ) |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ) |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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%' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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%' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ order by _ asc | select customer_id , customer_name from customers order by customer_id asc |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ order by _ asc | select customer_id , customer_name from customers order by customer_id asc |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ where _ like _ | 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%' |
insurance_fnol | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ where _ like _ | 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%' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ | select count ( * ) from enzyme |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ | select count ( * ) from enzyme |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ order by _ desc | select name from enzyme order by name desc |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ order by _ desc | select name from enzyme order by name desc |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ | select name , location from enzyme |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 _ from _ | select name , location from enzyme |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the 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 max ( _ ) from _ | select max ( omim ) from enzyme |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the maximum OMIM value in the database? | 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 max ( _ ) from _ | select max ( omim ) from enzyme |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'? | 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 _ from _ where _ | select product , chromosome , porphyria from enzyme where location = 'Cytosol' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'? | 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 _ from _ where _ | select product , chromosome , porphyria from enzyme where location = 'Cytosol' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of enzymes who does not produce 'Heme'? | 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 _ from _ where _ | select name from enzyme where product != 'Heme' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of enzymes whose product is not 'Heme'? | 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 _ from _ where _ | select name from enzyme where product != 'Heme' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names and trade names of the medicines which has 'Yes' value in the FDA record? | 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 _ from _ where _ | select name , trade_name from medicine where fda_approved = 'Yes' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names and trade names of the medcines that are FDA approved? | 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 _ from _ where _ | select name , trade_name from medicine where fda_approved = 'Yes' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'? | 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 _ from _ where _ | select enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id join medicine on medicine_enzyme_interaction.medicine_id = medicine.id where medicine.name = 'Amisulpride' and medicine_enzyme_interaction.interaction_type = 'inhibitor' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors? | 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 _ from _ where _ | select enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id join medicine on medicine_enzyme_interaction.medicine_id = medicine.id where medicine.name = 'Amisulpride' and medicine_enzyme_interaction.interaction_type = 'inhibitor' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the ids and names of the medicine that can interact with two or more 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 _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 2 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: For every medicine id, what are the names of the medicines that can interact with more than one enzyme? | 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 _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 2 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with. | 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 _ from _ group by _ order by count ( _ ) desc | select medicine.id , medicine.name , medicine.fda_approved from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id order by count ( * ) desc |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions? | 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 _ from _ group by _ order by count ( _ ) desc | select medicine.id , medicine.name , medicine.fda_approved from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id order by count ( * ) desc |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? | 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 _ from _ where _ group by _ order by count ( _ ) desc limit _ | select enzyme.id , enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id where medicine_enzyme_interaction.interaction_type = 'activitor' group by enzyme.id order by count ( * ) desc limit 1 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the id and name of the enzyme that can interact with the most medicines as an activator? | 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 _ from _ where _ group by _ order by count ( _ ) desc limit _ | select enzyme.id , enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id where medicine_enzyme_interaction.interaction_type = 'activitor' group by enzyme.id order by count ( * ) desc limit 1 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | 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 _ from _ where _ | select medicine_enzyme_interaction.interaction_type from medicine_enzyme_interaction join medicine on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on medicine_enzyme_interaction.enzyme_id = enzyme.id where enzyme.name = 'ALA synthase' and medicine.name = 'Aripiprazole' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | 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 _ from _ where _ | select medicine_enzyme_interaction.interaction_type from medicine_enzyme_interaction join medicine on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on medicine_enzyme_interaction.enzyme_id = enzyme.id where enzyme.name = 'ALA synthase' and medicine.name = 'Aripiprazole' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the most common interaction type between enzymes and medicine? And how many 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 _ group by _ order by count ( _ ) desc limit _ | select interaction_type , count ( * ) from medicine_enzyme_interaction group by interaction_type order by count ( * ) desc limit 1 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the most common types of interactions between enzymes and medicine, and how many types 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 _ group by _ order by count ( _ ) desc limit _ | select interaction_type , count ( * ) from medicine_enzyme_interaction group by interaction_type order by count ( * ) desc limit 1 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many medicines have the FDA approval status 'No' ? | 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 _ where _ | select count ( * ) from medicine where fda_approved = 'No' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many medicines were not approved by the FDA? | 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 _ where _ | select count ( * ) from medicine where fda_approved = 'No' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many enzymes do not have any interactions? | 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 _ where _ not in ( select _ from _ ) | select count ( * ) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction ) |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the count of enzymes without any interactions? | 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 _ where _ not in ( select _ from _ ) | select count ( * ) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction ) |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the id and trade name of the medicines can interact with at least 3 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 _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 3 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the ids and trade names of the medicine that can interact with at least 3 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 _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 3 |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction? | 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 distinct _ from _ where _ | select distinct enzyme.name , enzyme.location , enzyme.product from enzyme join medicine_enzyme_interaction on medicine_enzyme_interaction.enzyme_id = enzyme.id where medicine_enzyme_interaction.interaction_type = 'inhibitor' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the different names, locations, and products of the enzymes that are capable inhibitor interactions? | 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 distinct _ from _ where _ | select distinct enzyme.name , enzyme.location , enzyme.product from enzyme join medicine_enzyme_interaction on medicine_enzyme_interaction.enzyme_id = enzyme.id where medicine_enzyme_interaction.interaction_type = 'inhibitor' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with 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 _ from _ where _ intersect select _ from _ where _ | select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'inhibitor' intersect select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'activitor' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the medicine and trade names that can interact as an inhibitor and activitor with 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 _ from _ where _ intersect select _ from _ where _ | select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'inhibitor' intersect select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'activitor' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'. | 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 _ from _ except select _ from _ where _ | select name , trade_name from medicine except select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on enzyme.id = medicine_enzyme_interaction.enzyme_id where enzyme.product = 'Protoporphyrinogen IX' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'? | 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 _ from _ except select _ from _ where _ | select name , trade_name from medicine except select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on enzyme.id = medicine_enzyme_interaction.enzyme_id where enzyme.product = 'Protoporphyrinogen IX' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many distinct FDA approval statuses are there for the medicines? | 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 ( distinct _ ) from _ | select count ( distinct fda_approved ) from medicine |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many different FDA approval statuses exist for medicines? | 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 ( distinct _ ) from _ | select count ( distinct fda_approved ) from medicine |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which enzyme names have the substring "ALA"? | 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 _ from _ where _ like _ | select name from enzyme where name like '%ALA%' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of enzymes that include the string 'ALA'? | 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 _ from _ where _ like _ | select name from enzyme where name like '%ALA%' |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: find the number of medicines offered by each trade. | 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 _ group by _ | select trade_name , count ( * ) from medicine group by trade_name |
medicine_enzyme_interaction | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many medicines are offered by each trade name? | 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 _ group by _ | select trade_name , count ( * ) from medicine group by trade_name |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List all schools and their nicknames in the order of founded year. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc | select school , nickname from university order by founded asc |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the different schools and their nicknames, ordered by their founding years? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc | select school , nickname from university order by founded asc |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List all public schools and their locations. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ where _ | select school , location from university where affiliation = 'Public' |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the public schools and what are their locations? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ where _ | select school , location from university where affiliation = 'Public' |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: When was the school with the largest enrollment founded? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ desc limit _ | select founded from university order by enrollment desc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the founded year for the school with the largest enrollment. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ desc limit _ | select founded from university order by enrollment desc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the founded year of the newest non public school. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ where _ order by _ desc limit _ | select founded from university where affiliation != 'Public' order by founded desc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the founded year of the non public school that was founded most recently? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ where _ order by _ desc limit _ | select founded from university where affiliation != 'Public' order by founded desc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many schools are in the basketball match? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct school_id ) from basketball_match |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Count the number of schools that have had basketball matches. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct school_id ) from basketball_match |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the highest acc percent score in the competition? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ desc limit _ | select acc_percent from basketball_match order by acc_percent desc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the highest acc percent across all basketball matches. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ desc limit _ | select acc_percent from basketball_match order by acc_percent desc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the primary conference of the school that has the lowest acc percent score in the competition? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc limit _ | select university.primary_conference from university join basketball_match on university.school_id = basketball_match.school_id order by basketball_match.acc_percent asc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the primary conference of the school with the lowest acc percentage score. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc limit _ | select university.primary_conference from university join basketball_match on university.school_id = basketball_match.school_id order by basketball_match.acc_percent asc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the team name and acc regular season score of the school that was founded for the longest time? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc limit _ | select basketball_match.team_name , basketball_match.acc_regular_season from university join basketball_match on university.school_id = basketball_match.school_id order by university.founded asc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the name of the team and the acc during the regular season for the school that was founded the earliest. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc limit _ | select basketball_match.team_name , basketball_match.acc_regular_season from university join basketball_match on university.school_id = basketball_match.school_id order by university.founded asc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the location and all games score of the school that has Clemson as its team name. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ where _ | select basketball_match.all_games , university.location from university join basketball_match on university.school_id = basketball_match.school_id where team_name = 'Clemson' |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the all games score and location of the school called Clemson? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ where _ | select basketball_match.all_games , university.location from university join basketball_match on university.school_id = basketball_match.school_id where team_name = 'Clemson' |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the average enrollment size of the universities that are founded before 1850? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select avg ( _ ) from _ where _ | select avg ( enrollment ) from university where founded < 1850 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the average enrollment of universities founded before 1850. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select avg ( _ ) from _ where _ | select avg ( enrollment ) from university where founded < 1850 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the enrollment and primary_conference of the oldest college. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc limit _ | select enrollment , primary_conference from university order by founded asc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the enrollment and primary conference for the university which was founded the earliest? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select _ from _ order by _ asc limit _ | select enrollment , primary_conference from university order by founded asc limit 1 |
university_basketball | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the total and minimum enrollment of all schools? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id |
### Response:
select sum ( _ ) , min ( _ ) from _ | select sum ( enrollment ) , min ( enrollment ) from university |