db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
customers_and_addresses
select max(t2.active_to_date) from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t1.customer_name = 'tillman ernser'
Question: return the the 'active to date' of the latest contact channel used by the customer named 'tillman ernser'. | Tables: Addresses -> address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. Products -> product_id, product_details. Customers -> customer_id, payment_m...
return the the 'active to date' of the latest contact channel used by the customer named 'tillman ernser'.
customers_and_addresses
select avg(active_to_date - active_from_date) from customer_contact_channels
Question: what is the average time span of contact channels in the database? | Tables: 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_custom...
what is the average time span of contact channels in the database?
customers_and_addresses
select avg(active_to_date - active_from_date) from customer_contact_channels
Question: compute the average active time span of contact channels. | Tables: 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...
compute the average active time span of contact channels.
customers_and_addresses
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)
Question: what is the channel code and contact number of the customer contact channel that was active for the longest time? | Tables: Addresses -> address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. Products -> product_id, product_details. Customers -> customer_id, pa...
what is the channel code and contact number of the customer contact channel that was active for the longest time?
customers_and_addresses
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)
Question: return the channel code and contact number of the customer contact channel whose active duration was the longest. | Tables: Addresses -> address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. Products -> product_id, product_details. Customers -> customer_id, pa...
return the channel code and contact number of the customer contact channel whose active duration was the longest.
customers_and_addresses
select t1.customer_name , t2.active_from_date from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t2.channel_code = 'email'
Question: find the name and active date of the customer that use email as the contact channel. | Tables: 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, ...
find the name and active date of the customer that use email as the contact channel.
customers_and_addresses
select t1.customer_name , t2.active_from_date from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t2.channel_code = 'email'
Question: what are the name and active date of the customers whose contact channel code is email? | Tables: 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_nam...
what are the name and active date of the customers whose contact channel code is email?
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t3.order_quantity = ( select max(order_quantity) from order_items)
Question: what is the name of the customer that made the order with the largest quantity? | Tables: 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_...
what is the name of the customer that made the order with the largest quantity?
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t3.order_quantity = ( select max(order_quantity) from order_items)
Question: find the name of the customer who made the order of the largest amount of goods. | Tables: 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...
find the name of the customer who made the order of the largest amount of goods.
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) desc limit 1
Question: what is the name of the customer that has purchased the most items? | Tables: 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_custo...
what is the name of the customer that has purchased the most items?
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) desc limit 1
Question: give me the name of the customer who ordered the most items in total. | Tables: 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_cus...
give me the name of the customer who ordered the most items in total.
customers_and_addresses
select t1.payment_method from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) limit 1
Question: what is the payment method of the customer that has purchased the least quantity of items? | Tables: 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_...
what is the payment method of the customer that has purchased the least quantity of items?
customers_and_addresses
select t1.payment_method from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) limit 1
Question: tell me the payment method used by the customer who ordered the least amount of goods in total. | Tables: 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, cust...
tell me the payment method used by the customer who ordered the least amount of goods in total.
customers_and_addresses
select count(distinct t3.product_id) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = 'rodrick heaney'
Question: how many types of products have rodrick heaney bought in total? | Tables: 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,...
how many types of products have rodrick heaney bought in total?
customers_and_addresses
select count(distinct t3.product_id) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = 'rodrick heaney'
Question: find the number of distinct products rodrick heaney has bought so far. | Tables: 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_cu...
find the number of distinct products rodrick heaney has bought so far.
customers_and_addresses
select sum(t3.order_quantity) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = 'rodrick heaney'
Question: what is the total quantity of products purchased by 'rodrick heaney'? | Tables: 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_cus...
what is the total quantity of products purchased by 'rodrick heaney'?
customers_and_addresses
select sum(t3.order_quantity) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = 'rodrick heaney'
Question: tell me the total quantity of products bought by the customer called 'rodrick heaney'. | Tables: 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...
tell me the total quantity of products bought by the customer called 'rodrick heaney'.
customers_and_addresses
select count(distinct customer_id) from customer_orders where order_status = 'cancelled'
Question: how many customers have at least one order with status 'cancelled'? | Tables: 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_custo...
how many customers have at least one order with status 'cancelled'?
customers_and_addresses
select count(distinct customer_id) from customer_orders where order_status = 'cancelled'
Question: return the number of customers who have at least one order with 'cancelled' status. | Tables: 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, d...
return the number of customers who have at least one order with 'cancelled' status.
customers_and_addresses
select count(*) from customer_orders where order_details = 'second time'
Question: how many orders have detail 'second time'? | Tables: 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_detai...
how many orders have detail 'second time'?
customers_and_addresses
select count(*) from customer_orders where order_details = 'second time'
Question: tell me the number of orders with 'second time' as order detail. | Tables: 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...
tell me the number of orders with 'second time' as order detail.
customers_and_addresses
select t1.customer_name , t2.order_date from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where order_status = 'delivered'
Question: find the customer name and date of the orders that have the status 'delivered'. | Tables: 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_...
find the customer name and date of the orders that have the status 'delivered'.
customers_and_addresses
select t1.customer_name , t2.order_date from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where order_status = 'delivered'
Question: what are the customer name and date of the orders whose status is 'delivered'. | Tables: 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_b...
what are the customer name and date of the orders whose status is 'delivered'.
customers_and_addresses
select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_status = 'cancelled'
Question: what is the total number of products that are in orders with status 'cancelled'? | Tables: 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...
what is the total number of products that are in orders with status 'cancelled'?
customers_and_addresses
select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_status = 'cancelled'
Question: find the total quantity of products associated with the orders in the 'cancelled' status. | Tables: 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_n...
find the total quantity of products associated with the orders in the 'cancelled' status.
customers_and_addresses
select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_date < '2018-03-17 07:13:53'
Question: find the total amount of products ordered before 2018-03-17 07:13:53. | Tables: 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_cus...
find the total amount of products ordered before 2018-03-17 07:13:53.
customers_and_addresses
select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_date < '2018-03-17 07:13:53'
Question: what is the total amount of products purchased before 2018-03-17 07:13:53? | Tables: 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_becam...
what is the total amount of products purchased before 2018-03-17 07:13:53?
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id order by t2.order_date desc limit 1
Question: who made the latest order? | Tables: 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_Add...
who made the latest order?
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id order by t2.order_date desc limit 1
Question: find the name of the customer who made an order most recently. | Tables: 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, ...
find the name of the customer who made an order most recently.
customers_and_addresses
select t2.product_details from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by count(*) desc limit 1
Question: which product has been ordered most number of times? | Tables: 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_cust...
which product has been ordered most number of times?
customers_and_addresses
select t2.product_details from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by count(*) desc limit 1
Question: what is the most frequently ordered product? tell me the detail of the product | Tables: 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_b...
what is the most frequently ordered product? tell me the detail of the product
customers_and_addresses
select t2.product_details , t2.product_id from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by sum(t1.order_quantity) limit 1
Question: find the name and id of the product whose total order quantity is the largest. | Tables: 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_b...
find the name and id of the product whose total order quantity is the largest.
customers_and_addresses
select t2.product_details , t2.product_id from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by sum(t1.order_quantity) limit 1
Question: what are the name and id of the product bought the most. | Tables: 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_...
what are the name and id of the product bought the most.
customers_and_addresses
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'
Question: find all the addresses in east julianaside, texas or in gleasonmouth, arizona. | Tables: 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_b...
find all the addresses in east julianaside, texas or in gleasonmouth, arizona.
customers_and_addresses
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'
Question: what are all the addresses in east julianaside, texas or in gleasonmouth, arizona. | Tables: 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, da...
what are all the addresses in east julianaside, texas or in gleasonmouth, arizona.
customers_and_addresses
select customer_name from customers where payment_method != 'cash'
Question: find the name of customers who did not pay with cash. | Tables: 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_cus...
find the name of customers who did not pay with cash.
customers_and_addresses
select customer_name from customers where payment_method != 'cash'
Question: what is the name of customers who do not use cash as payment method. | Tables: 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_cust...
what is the name of customers who do not use cash as payment method.
customers_and_addresses
select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'latte'
Question: find the names of customers who never ordered product latte. | Tables: 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, ot...
find the names of customers who never ordered product latte.
customers_and_addresses
select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'latte'
Question: what are names of customers who never ordered product latte. | Tables: 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, ot...
what are names of customers who never ordered product latte.
customers_and_addresses
select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id
Question: find the names of customers who never placed an order. | Tables: 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_cu...
find the names of customers who never placed an order.
customers_and_addresses
select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id
Question: what are the names of customers who never made an order. | Tables: 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_...
what are the names of customers who never made an order.
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'latte' intersect select t1.customer_name from customers as t1 join custo...
Question: find the names of customers who ordered both products latte and americano. | Tables: 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_becam...
find the names of customers who ordered both products latte and americano.
customers_and_addresses
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'latte' intersect select t1.customer_name from customers as t1 join custo...
Question: what are the names of customers who have purchased both products latte and americano? | Tables: 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,...
what are the names of customers who have purchased both products latte and americano?
music_4
select count(*) from artist
Question: how many artists are there? | Tables: 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. | Joins: volume.Artist_ID = artist.Artist_I...
how many artists are there?
music_4
select count(*) from artist
Question: count the number of artists. | Tables: 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. | Joins: volume.Artist_ID = artist.Artist_...
count the number of artists.
music_4
select age from artist
Question: list the age of all music artists. | Tables: 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. | Joins: volume.Artist_ID = artist.A...
list the age of all music artists.
music_4
select age from artist
Question: what are the ages of all music artists? | Tables: 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. | Joins: volume.Artist_ID = art...
what are the ages of all music artists?
music_4
select avg(age) from artist
Question: what is the average age of all artists? | Tables: 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. | Joins: volume.Artist_ID = art...
what is the average age of all artists?
music_4
select avg(age) from artist
Question: return the average age across all artists. | Tables: 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. | Joins: volume.Artist_ID = ...
return the average age across all artists.
music_4
select famous_title from artist where artist = 'triumfall'
Question: what are the famous titles of the artist 'triumfall'? | Tables: 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. | Joins: volume.A...
what are the famous titles of the artist 'triumfall'?
music_4
select famous_title from artist where artist = 'triumfall'
Question: return the famous titles of the artist called 'triumfall'. | Tables: 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. | Joins: vol...
return the famous titles of the artist called 'triumfall'.
music_4
select distinct(famous_release_date) from artist
Question: what are the distinct famous release dates? | Tables: 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. | Joins: volume.Artist_ID =...
what are the distinct famous release dates?
music_4
select distinct(famous_release_date) from artist
Question: give the distinct famous release dates for all artists. | Tables: 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. | Joins: volume...
give the distinct famous release dates for all artists.
music_4
select date_of_ceremony , result from music_festival
Question: return the dates of ceremony and the results of all music festivals | Tables: 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. | J...
return the dates of ceremony and the results of all music festivals
music_4
select date_of_ceremony , result from music_festival
Question: what are the dates of ceremony and results for each music festival? | Tables: 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. | J...
what are the dates of ceremony and results for each music festival?
music_4
select category from music_festival where result = 'awarded'
Question: what are the category of music festivals with result 'awarded'? | Tables: 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. | Joins...
what are the category of music festivals with result 'awarded'?
music_4
select category from music_festival where result = 'awarded'
Question: return the categories of music festivals that have the result 'awarded'. | Tables: 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...
return the categories of music festivals that have the result 'awarded'.
music_4
select max(weeks_on_top) , min(weeks_on_top) from volume
Question: what are the maximum and minimum week on top of all volumes? | Tables: 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. | Joins: v...
what are the maximum and minimum week on top of all volumes?
music_4
select max(weeks_on_top) , min(weeks_on_top) from volume
Question: give the maximum and minimum weeks on top across all volumes. | Tables: 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. | Joins: ...
give the maximum and minimum weeks on top across all volumes.
music_4
select song from volume where weeks_on_top > 1
Question: what are the songs in volumes with more than 1 week on top? | Tables: 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. | Joins: vo...
what are the songs in volumes with more than 1 week on top?
music_4
select song from volume where weeks_on_top > 1
Question: give the songs included in volumes that have more than 1 week on top. | Tables: 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. |...
give the songs included in volumes that have more than 1 week on top.
music_4
select song from volume order by song
Question: please list all songs in volumes in ascending alphabetical order. | Tables: 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. | Joi...
please list all songs in volumes in ascending alphabetical order.
music_4
select song from volume order by song
Question: what are the the songs in volumes, listed in ascending order? | Tables: 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. | Joins: ...
what are the the songs in volumes, listed in ascending order?
music_4
select count(distinct artist_id) from volume
Question: how many distinct artists do the volumes associate to? | Tables: 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. | Joins: volume....
how many distinct artists do the volumes associate to?
music_4
select count(distinct artist_id) from volume
Question: count the number of distinct artists who have volumes. | Tables: 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. | Joins: volume....
count the number of distinct artists who have volumes.
music_4
select t1.date_of_ceremony from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t2.weeks_on_top > 2
Question: please show the date of ceremony of the volumes that last more than 2 weeks on top. | Tables: 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, Vol...
please show the date of ceremony of the volumes that last more than 2 weeks on top.
music_4
select t1.date_of_ceremony from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t2.weeks_on_top > 2
Question: what are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top? | Tables: 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, Da...
what are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?
music_4
select t2.song from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t1.result = 'nominated'
Question: please show the songs that have result 'nominated' at music festivals. | Tables: 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. ...
please show the songs that have result 'nominated' at music festivals.
music_4
select t2.song from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t1.result = 'nominated'
Question: what are the songs in volumes that have resulted in a nomination at music festivals? | Tables: 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, Vo...
what are the songs in volumes that have resulted in a nomination at music festivals?
music_4
select t2.issue_date from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.artist = 'gorgoroth'
Question: what are the issue dates of volumes associated with the artist 'gorgoroth'? | Tables: 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, Res...
what are the issue dates of volumes associated with the artist 'gorgoroth'?
music_4
select t2.issue_date from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.artist = 'gorgoroth'
Question: return the issue dates of volumes that are by the artist named gorgoroth. | Tables: 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, Resul...
return the issue dates of volumes that are by the artist named gorgoroth.
music_4
select t2.song from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age >= 32
Question: what are the songs in volumes associated with the artist aged 32 or older? | Tables: 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, Resu...
what are the songs in volumes associated with the artist aged 32 or older?
music_4
select t2.song from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age >= 32
Question: return names of songs in volumes that are by artists that are at least 32 years old. | Tables: 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, Vo...
return names of songs in volumes that are by artists that are at least 32 years old.
music_4
select avg(t2.weeks_on_top) from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age <= 25
Question: what is the average weeks on top of volumes associated with the artist aged 25 or younger? | Tables: 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, Catego...
what is the average weeks on top of volumes associated with the artist aged 25 or younger?
music_4
select avg(t2.weeks_on_top) from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age <= 25
Question: return the average number of weeks on top for volumes by artists that are at most 25 years old. | Tables: 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, C...
return the average number of weeks on top for volumes by artists that are at most 25 years old.
music_4
select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2
Question: what are the famous title of the artists associated with volumes with more than 2 weeks on top? | Tables: 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, C...
what are the famous title of the artists associated with volumes with more than 2 weeks on top?
music_4
select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2
Question: return the famous titles for artists that have volumes that lasted more than 2 weeks on top. | Tables: 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, Cate...
return the famous titles for artists that have volumes that lasted more than 2 weeks on top.
music_4
select famous_title , age from artist order by age desc
Question: please list the age and famous title of artists in descending order of age. | Tables: 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, Res...
please list the age and famous title of artists in descending order of age.
music_4
select famous_title , age from artist order by age desc
Question: what are the famous titles and ages of each artist, listed in descending order by age? | Tables: 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, ...
what are the famous titles and ages of each artist, listed in descending order by age?
music_4
select famous_release_date from artist order by age desc limit 1
Question: what is the famous release date of the artist with the oldest age? | Tables: 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. | Jo...
what is the famous release date of the artist with the oldest age?
music_4
select famous_release_date from artist order by age desc limit 1
Question: return the famous release date for the oldest artist. | Tables: 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. | Joins: volume.A...
return the famous release date for the oldest artist.
music_4
select category , count(*) from music_festival group by category
Question: please show the categories of the music festivals and the count. | Tables: 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. | Join...
please show the categories of the music festivals and the count.
music_4
select category , count(*) from music_festival group by category
Question: return the number of music festivals of each category. | Tables: 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. | Joins: volume....
return the number of music festivals of each category.
music_4
select result from music_festival group by result order by count(*) desc limit 1
Question: what is the most common result of the music festival? | Tables: 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. | Joins: volume.A...
what is the most common result of the music festival?
music_4
select result from music_festival group by result order by count(*) desc limit 1
Question: return the result that is most frequent at music festivals. | Tables: 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. | Joins: vo...
return the result that is most frequent at music festivals.
music_4
select category from music_festival group by category having count(*) > 1
Question: please show the categories of the music festivals with count more than 1. | Tables: 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, Resul...
please show the categories of the music festivals with count more than 1.
music_4
select category from music_festival group by category having count(*) > 1
Question: what are the categories of music festivals for which there have been more than 1 music festival? | Tables: 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, ...
what are the categories of music festivals for which there have been more than 1 music festival?
music_4
select song from volume order by weeks_on_top desc limit 1
Question: what is the song in the volume with the maximum weeks on top? | Tables: 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. | Joins: ...
what is the song in the volume with the maximum weeks on top?
music_4
select song from volume order by weeks_on_top desc limit 1
Question: return the song in the volume that has spent the most weeks on top? | Tables: 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. | J...
return the song in the volume that has spent the most weeks on top?
music_4
select famous_title from artist where artist_id not in(select artist_id from volume)
Question: find the famous titles of artists that do not have any volume. | Tables: 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. | Joins:...
find the famous titles of artists that do not have any volume.
music_4
select famous_title from artist where artist_id not in(select artist_id from volume)
Question: what are the famous titles of artists who do not have any volumes? | Tables: 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. | Jo...
what are the famous titles of artists who do not have any volumes?
music_4
select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2 intersect select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top < 2
Question: 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. | Tables: artist -> Artist_ID, Artist, Age, Famous_Title, Famous_Release_date. volume -> Volume_ID, Volume_Issue, Issue_Date, Weeks_on_Top, Song, Artist_ID. music_fest...
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.
music_4
select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2 intersect select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top < 2
Question: 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? | Tables: artist -> Artist_ID, Artist, Age, Famous_Title, Famous_Release_date. volume -> Volume_ID, Volume_Issue, Issue_Date, Weeks_on_Top, Song, Artist...
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?
music_4
select date_of_ceremony from music_festival where category = 'best song' and result = 'awarded'
Question: what are the date of ceremony of music festivals with category 'best song' and result 'awarded'? | Tables: 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, ...
what are the date of ceremony of music festivals with category 'best song' and result 'awarded'?
music_4
select date_of_ceremony from music_festival where category = 'best song' and result = 'awarded'
Question: return the dates of ceremony corresponding to music festivals that had the category 'best song' and result 'awarded'. | Tables: 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_Festiva...
return the dates of ceremony corresponding to music festivals that had the category 'best song' and result 'awarded'.
music_4
select issue_date from volume order by weeks_on_top asc limit 1
Question: what is the issue date of the volume with the minimum weeks on top? | Tables: 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. | J...
what is the issue date of the volume with the minimum weeks on top?
music_4
select issue_date from volume order by weeks_on_top asc limit 1
Question: return the issue date of the volume that has spent the fewest weeks on top. | Tables: 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, Res...
return the issue date of the volume that has spent the fewest weeks on top.
music_4
select count(distinct artist_id) from volume
Question: how many distinct artists have volumes? | Tables: 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. | Joins: volume.Artist_ID = art...
how many distinct artists have volumes?
music_4
select count(distinct artist_id) from volume
Question: count the number of artists who have had volumes. | Tables: 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. | Joins: volume.Artis...
count the number of artists who have had volumes.
music_4
select result , count(*) from music_festival group by result order by count(*) desc
Question: please show the results of music festivals and the number of music festivals that have had each, ordered by this count. | Tables: 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_Festi...
please show the results of music festivals and the number of music festivals that have had each, ordered by this count.