db_id
stringlengths 4
31
| text
stringlengths 370
4.84k
|
---|---|
customers_and_addresses | 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 the "active to date" of the latest contact channel used by the customer named "Tillman Ernser". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select max ( customer_contact_channels.active_to_date ) from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customers.customer_name = 'Tillman Ernser' |
customers_and_addresses | 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 average time span of contact channels in the database? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select avg ( active_to_date - active_from_date ) from customer_contact_channels |
customers_and_addresses | 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: Compute the average active time span of contact channels. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select avg ( active_to_date - active_from_date ) from customer_contact_channels |
customers_and_addresses | 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 channel code and contact number of the customer contact channel that was active for the longest time? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select channel_code , contact_number from customer_contact_channels where active_to_date - active_from_date = ( select active_to_date - active_from_date from customer_contact_channels order by ( active_to_date - active_from_date ) desc limit 1 ) |
customers_and_addresses | 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 channel code and contact number of the customer contact channel whose active duration was the longest. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select channel_code , contact_number from customer_contact_channels where active_to_date - active_from_date = ( select active_to_date - active_from_date from customer_contact_channels order by ( active_to_date - active_from_date ) desc limit 1 ) |
customers_and_addresses | 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 and active date of the customer that use email as the contact channel. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name , customer_contact_channels.active_from_date from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customer_contact_channels.channel_code = 'Email' |
customers_and_addresses | 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 name and active date of the customers whose contact channel code is email? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name , customer_contact_channels.active_from_date from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customer_contact_channels.channel_code = 'Email' |
customers_and_addresses | 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 that made the order with the largest quantity? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where order_items.order_quantity = ( select max ( order_quantity ) from order_items ) |
customers_and_addresses | 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 the customer who made the order of the largest amount of goods. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where order_items.order_quantity = ( select max ( order_quantity ) from order_items ) |
customers_and_addresses | 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 that has purchased the most items? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) desc limit 1 |
customers_and_addresses | 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 the name of the customer who ordered the most items in total. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) desc limit 1 |
customers_and_addresses | 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 payment method of the customer that has purchased the least quantity of items? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.payment_method from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) asc limit 1 |
customers_and_addresses | 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 payment method used by the customer who ordered the least amount of goods in total. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.payment_method from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) asc limit 1 |
customers_and_addresses | 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 types of products have Rodrick Heaney bought in total? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( distinct order_items.product_id ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney' |
customers_and_addresses | 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 distinct products Rodrick Heaney has bought so far. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( distinct order_items.product_id ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney' |
customers_and_addresses | 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 quantity of products purchased by "Rodrick Heaney"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select sum ( order_items.order_quantity ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney' |
customers_and_addresses | 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 total quantity of products bought by the customer called "Rodrick Heaney". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select sum ( order_items.order_quantity ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney' |
customers_and_addresses | 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 customers have at least one order with status "Cancelled"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( distinct customer_id ) from customer_orders where order_status = 'Cancelled' |
customers_and_addresses | 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 number of customers who have at least one order with "Cancelled" status. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( distinct customer_id ) from customer_orders where order_status = 'Cancelled' |
customers_and_addresses | 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 orders have detail "Second time"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( * ) from customer_orders where order_details = 'Second time' |
customers_and_addresses | 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 number of orders with "Second time" as order detail. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select count ( * ) from customer_orders where order_details = 'Second time' |
customers_and_addresses | 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 customer name and date of the orders that have the status "Delivered". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name , customer_orders.order_date from customers join customer_orders on customers.customer_id = customer_orders.customer_id where order_status = 'Delivered' |
customers_and_addresses | 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 customer name and date of the orders whose status is "Delivered". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name , customer_orders.order_date from customers join customer_orders on customers.customer_id = customer_orders.customer_id where order_status = 'Delivered' |
customers_and_addresses | 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 number of products that are in orders with status "Cancelled"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_status = 'Cancelled' |
customers_and_addresses | 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 quantity of products associated with the orders in the "Cancelled" status. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_status = 'Cancelled' |
customers_and_addresses | 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 amount of products ordered before 2018-03-17 07:13:53. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_date < '2018-03-17 07:13:53' |
customers_and_addresses | 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 amount of products purchased before 2018-03-17 07:13:53? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_date < '2018-03-17 07:13:53' |
customers_and_addresses | 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: Who made the latest order? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id order by customer_orders.order_date desc limit 1 |
customers_and_addresses | 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 the customer who made an order most recently. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id order by customer_orders.order_date desc limit 1 |
customers_and_addresses | 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 product has been ordered most number of times? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select products.product_details from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by count ( * ) desc limit 1 |
customers_and_addresses | 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 frequently ordered product? Tell me the detail of the product | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select products.product_details from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by count ( * ) desc limit 1 |
customers_and_addresses | 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 and ID of the product whose total order quantity is the largest. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select products.product_details , products.product_id from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by sum ( order_items.order_quantity ) asc limit 1 |
customers_and_addresses | 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 name and ID of the product bought the most. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select products.product_details , products.product_id from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by sum ( order_items.order_quantity ) asc limit 1 |
customers_and_addresses | 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 all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select address_content from addresses where city = 'East Julianaside' and state_province_county = 'Texas' union select address_content from addresses where city = 'Gleasonmouth' and state_province_county = 'Arizona' |
customers_and_addresses | 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 addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select address_content from addresses where city = 'East Julianaside' and state_province_county = 'Texas' union select address_content from addresses where city = 'Gleasonmouth' and state_province_county = 'Arizona' |
customers_and_addresses | 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 customers who did not pay with Cash. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name from customers where payment_method != 'Cash' |
customers_and_addresses | 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 customers who do not use Cash as payment method. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name from customers where payment_method != 'Cash' |
customers_and_addresses | 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 never ordered product Latte. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte' |
customers_and_addresses | 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 names of customers who never ordered product Latte. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte' |
customers_and_addresses | 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 never placed an order. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id |
customers_and_addresses | 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 customers who never made an order. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id |
customers_and_addresses | 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 ordered both products Latte and Americano. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte' intersect select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Americano' |
customers_and_addresses | 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 customers who have purchased both products Latte and Americano? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id |
### Response:
select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte' intersect select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Americano' |
music_4 | 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 artists are there? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select count ( * ) from artist |
music_4 | 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 artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select count ( * ) from artist |
music_4 | 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 age of all music artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select age from artist |
music_4 | 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 ages of all music artists? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select age from artist |
music_4 | 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 average age of all artists? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select avg ( age ) from artist |
music_4 | 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 age across all artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select avg ( age ) from artist |
music_4 | 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 famous titles of the artist "Triumfall"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_title from artist where artist = 'Triumfall' |
music_4 | 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 famous titles of the artist called "Triumfall". | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_title from artist where artist = 'Triumfall' |
music_4 | 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 Famous release dates? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select distinct ( famous_release_date ) from artist |
music_4 | 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 the distinct famous release dates for all artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select distinct ( famous_release_date ) from artist |
music_4 | 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 dates of ceremony and the results of all music festivals | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select date_of_ceremony , result from music_festival |
music_4 | 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 dates of ceremony and results for each music festival? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select date_of_ceremony , result from music_festival |
music_4 | 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 category of music festivals with result "Awarded"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select category from music_festival where result = 'Awarded' |
music_4 | 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 categories of music festivals that have the result "Awarded". | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select category from music_festival where result = 'Awarded' |
music_4 | 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 week on top of all volumes? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select max ( weeks_on_top ) , min ( weeks_on_top ) from volume |
music_4 | 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 the maximum and minimum weeks on top across all volumes. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select max ( weeks_on_top ) , min ( weeks_on_top ) from volume |
music_4 | 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 songs in volumes with more than 1 week on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select song from volume where weeks_on_top > 1 |
music_4 | 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 the songs included in volumes that have more than 1 week on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select song from volume where weeks_on_top > 1 |
music_4 | 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: Please list all songs in volumes in ascending alphabetical order. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select song from volume order by song asc |
music_4 | 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 the songs in volumes, listed in ascending order? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select song from volume order by song asc |
music_4 | 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 artists do the volumes associate to? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select count ( distinct artist_id ) from volume |
music_4 | 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 distinct artists who have volumes. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select count ( distinct artist_id ) from volume |
music_4 | 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: Please show the date of ceremony of the volumes that last more than 2 weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select music_festival.date_of_ceremony from music_festival join volume on music_festival.volume = volume.volume_id where volume.weeks_on_top > 2 |
music_4 | 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 dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select music_festival.date_of_ceremony from music_festival join volume on music_festival.volume = volume.volume_id where volume.weeks_on_top > 2 |
music_4 | 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: Please show the songs that have result "nominated" at music festivals. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select volume.song from music_festival join volume on music_festival.volume = volume.volume_id where music_festival.result = 'Nominated' |
music_4 | 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 songs in volumes that have resulted in a nomination at music festivals? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select volume.song from music_festival join volume on music_festival.volume = volume.volume_id where music_festival.result = 'Nominated' |
music_4 | 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 issue dates of volumes associated with the artist "Gorgoroth"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select volume.issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.artist = 'Gorgoroth' |
music_4 | 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 issue dates of volumes that are by the artist named Gorgoroth. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select volume.issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.artist = 'Gorgoroth' |
music_4 | 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 songs in volumes associated with the artist aged 32 or older? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select volume.song from artist join volume on artist.artist_id = volume.artist_id where artist.age >= 32 |
music_4 | 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 names of songs in volumes that are by artists that are at least 32 years old. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select volume.song from artist join volume on artist.artist_id = volume.artist_id where artist.age >= 32 |
music_4 | 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 average weeks on top of volumes associated with the artist aged 25 or younger? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select avg ( volume.weeks_on_top ) from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 25 |
music_4 | 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 number of weeks on top for volumes by artists that are at most 25 years old. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select avg ( volume.weeks_on_top ) from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 25 |
music_4 | 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 famous title of the artists associated with volumes with more than 2 weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2 |
music_4 | 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 famous titles for artists that have volumes that lasted more than 2 weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2 |
music_4 | 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: Please list the age and famous title of artists in descending order of age. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_title , age from artist order by age desc |
music_4 | 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 famous titles and ages of each artist, listed in descending order by age? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_title , age from artist order by age desc |
music_4 | 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 famous release date of the artist with the oldest age? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_release_date from artist order by age desc limit 1 |
music_4 | 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 famous release date for the oldest artist. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_release_date from artist order by age desc limit 1 |
music_4 | 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: Please show the categories of the music festivals and the count. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select category , count ( * ) from music_festival group by category |
music_4 | 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 number of music festivals of each category. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select category , count ( * ) from music_festival group by category |
music_4 | 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 result of the music festival? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select result from music_festival group by result order by count ( * ) desc limit 1 |
music_4 | 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 result that is most frequent at music festivals. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select result from music_festival group by result order by count ( * ) desc limit 1 |
music_4 | 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: Please show the categories of the music festivals with count more than 1. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select category from music_festival group by category having count ( * ) > 1 |
music_4 | 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 categories of music festivals for which there have been more than 1 music festival? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select category from music_festival group by category having count ( * ) > 1 |
music_4 | 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 song in the volume with the maximum weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select song from volume order by weeks_on_top desc limit 1 |
music_4 | 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 song in the volume that has spent the most weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select song from volume order by weeks_on_top desc limit 1 |
music_4 | 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 famous titles of artists that do not have any volume. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_title from artist where artist_id not in ( select artist_id from volume ) |
music_4 | 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 famous titles of artists who do not have any volumes? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select famous_title from artist where artist_id not in ( select artist_id from volume ) |
music_4 | 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 famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2 intersect select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top < 2 |
music_4 | 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 famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2 intersect select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top < 2 |
music_4 | 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 date of ceremony of music festivals with category "Best Song" and result "Awarded"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select date_of_ceremony from music_festival where category = 'Best Song' and result = 'Awarded' |
music_4 | 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 dates of ceremony corresponding to music festivals that had the category "Best Song" and result "Awarded". | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select date_of_ceremony from music_festival where category = 'Best Song' and result = 'Awarded' |
music_4 | 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 issue date of the volume with the minimum weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select issue_date from volume order by weeks_on_top asc limit 1 |
music_4 | 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 issue date of the volume that has spent the fewest weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select issue_date from volume order by weeks_on_top asc limit 1 |
music_4 | 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 artists have volumes? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select count ( distinct artist_id ) from volume |
music_4 | 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 artists who have had volumes. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select count ( distinct artist_id ) from volume |
music_4 | 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: Please show the results of music festivals and the number of music festivals that have had each, ordered by this count. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select result , count ( * ) from music_festival group by result order by count ( * ) desc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.