interaction_utterance
sequencelengths 0
6
| interaction_query
sequencelengths 0
6
| final_utterance
stringlengths 19
224
| final_query
stringlengths 22
577
| db_id
stringclasses 140
values |
---|---|---|---|---|
[
"What is the minimum quantity of stocks?",
"What about the average value?"
] | [
"SELECT min(Quantity) FROM stock",
"SELECT avg(Quantity) FROM stock"
] | What is the average quantity of stocks? | SELECT avg(Quantity) FROM stock | device |
[
"List all the names of the shop and their locations",
"Order those results in ascending alphabetical order of name."
] | [
"SELECT Shop_Name , LOCATION FROM shop",
"SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC"
] | What are the names and location of the shops in ascending alphabetical order of name. | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC | device |
[
"Show all in the information about devices.",
"What are the unique software platforms",
"How many are there?"
] | [
"SELECT * FROM device",
"SELECT DISTINCT Software_Platform FROM device",
"SELECT count(DISTINCT Software_Platform) FROM device"
] | How many different software platforms are there for devices? | SELECT count(DISTINCT Software_Platform) FROM device | device |
[
"Show the information about the shops that are not \"Apple\".",
"How about the shops are \"Apple\"?",
"What are the open dates and open years of them?"
] | [
"SELECT * FROM shop WHERE Shop_Name != \"Apple\"",
"SELECT * FROM shop WHERE Shop_Name = \"Apple\"",
"SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\""
] | List the open date of open year of the shop named "Apple". | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple" | device |
[
"List the names and open year of all the shops.",
"Keep those opens later than 2010?",
"Order all the shop names by the open year, from early to late.",
"Show the name of the shop with the latest open year."
] | [
"SELECT Shop_Name, Open_Year FROM shop",
"SELECT Shop_Name, Open_Year FROM shop where open_year > 2010",
"SELECT Shop_Name, open_year FROM shop ORDER BY Open_Year",
"SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1"
] | List the name of the shop with the latest open year. | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 | device |
[
"List the shop names.",
"Keep the names where there is a stock",
"Keep the names of shops and the carriers of devices where there is a stock."
] | [
"SELECT Shop_Name from shop",
"SELECT T1.Shop_Name from shop as T1 join stock as T2 on T1.shop_id = T2.shop_id",
"SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID"
] | Show names of shops and the carriers of devices they have in stock. | SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID | device |
[
"List all the shop names.",
"List all the shop names that has stock in the shops.",
"Among those, keep the shop names whose open year is later than 2010",
"List the names of shops that have more than one kind of device in stock."
] | [
"SELECT Shop_Name FROM shop",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID Having T2.Open_Year > 2010",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1"
] | Show names of shops that have more than one kind of device in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 | device |
[
"List all the shop names.",
"Which shop has the least quantity of devices, show the shop name.",
"What about the shop that has the most kind of devices in stock?"
] | [
"SELECT Shop_Name FROM shop",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) ASC LIMIT 1",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the name of the shop that has the most kind of devices in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 | device |
[
"List all the shop names.",
"Which shop has the least quantity of devices, show the shop name.",
"What about the largest quantity one?"
] | [
"SELECT Shop_Name FROM shop",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) ASC LIMIT 1",
"SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1"
] | Show the name of the shop that have the largest quantity of devices in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 | device |
[
"Show all the software platforms",
"How many for each?"
] | [
"SELECT Software_Platform FROM device",
"SELECT Software_Platform, count(*) FROM device GROUP BY Software_Platform"
] | Please show different software platforms and the corresponding number of devices using each. | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform | device |
[
"Show all the software platforms",
"How many device for each?",
"Order the software platforms by popularity, from the most to the least?"
] | [
"SELECT Software_Platform FROM device",
"SELECT Software_Platform, count(*) FROM device GROUP BY Software_Platform",
"SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC"
] | Please show the software platforms of devices in descending order of the count. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC | device |
[
"Show all the software platforms",
"How many for each?",
"Which two are the most popular software platform?",
"What about top 1?"
] | [
"SELECT Software_Platform FROM device",
"SELECT Software_Platform, count(*) FROM device GROUP BY Software_Platform",
"SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 2",
"SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1"
] | List the software platform shared by the greatest number of devices. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 | device |
[
"What are the names of the shops?",
"Which shop has some devices in stock?",
"What about no device at all?"
] | [
"SELECT Shop_Name FROM shop",
"SELECT Shop_Name FROM shop WHERE Shop_ID IN (SELECT Shop_ID FROM stock)",
"SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)"
] | List the names of shops that have no devices in stock. | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) | device |
[
"Show all the shop names and the location",
"Keep those shops which opened in January.",
"Keep the locations shared by shops with open year later than 2012 and shops with open year before 2008."
] | [
"SELECT Shop_name, LOCATION FROM shop",
"SELECT Shop_name, LOCATION FROM shop WHERE Open_Date like \"%Jan%\"",
"SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008"
] | Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 | device |
[
"List all the carriers",
"Show all the unique carriers of the devices in the stock.",
"Which carriers have no devices in stock?"
] | [
"SELECT Carrier FROM device",
"SELECT DISTINCT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID",
"SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)"
] | List the carriers of devices that have no devices in stock. | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock) | device |
[
"List all the actors.",
"How many are there?"
] | [
"SELECT * FROM actor",
"SELECT count(*) FROM actor"
] | How many actors are there? | SELECT count(*) FROM actor | musical |
[
"Show all the names of the actors.",
"List them in ascending alphabetical order."
] | [
"SELECT Name FROM actor",
"SELECT Name FROM actor ORDER BY Name ASC"
] | List the name of actors in ascending alphabetical order. | SELECT Name FROM actor ORDER BY Name ASC | musical |
[
"List all the actors.",
"How many in total?",
"What are the characters and duration of them?"
] | [
"SELECT * FROM actor",
"SELECT count(*) FROM actor",
"SELECT Character , Duration FROM actor"
] | What are the characters and duration of actors? | SELECT Character , Duration FROM actor | musical |
[
"List all the names and ages.",
"Keep the names who are younger than 21.",
"What about the names of actors whose age is not 20."
] | [
"SELECT Name, Age FROM actor",
"SELECT Name FROM actor WHERE Age < 21",
"SELECT Name FROM actor WHERE Age != 20"
] | List the name of actors whose age is not 20. | SELECT Name FROM actor WHERE Age != 20 | musical |
[
"Show the characters of actors.",
"List them in descending order of age."
] | [
"SELECT Character FROM actor",
"SELECT Character FROM actor ORDER BY age DESC"
] | What are the characters of actors in descending order of age? | SELECT Character FROM actor ORDER BY age DESC | musical |
[
"List the durations of all actors.",
"What is the duration of 'Lynne McGranger'?",
"What about the oldest actor?"
] | [
"SELECT Duration FROM actor",
"SELECT Duration FROM actor WHERE Name = 'Lynne McGranger'",
"SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1"
] | What is the duration of the oldest actor? | SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1 | musical |
[
"Show all the musical names information.",
"Which of them has the award of 'Tony Award'?",
"What about having the nominee of \"Bob Fosse\"?"
] | [
"SELECT Name FROM musical",
"SELECT Name FROM musical WHERE Award = 'Tony Award'",
"SELECT Name FROM musical WHERE Nominee = \"Bob Fosse\""
] | What are the names of musicals with nominee "Bob Fosse"? | SELECT Name FROM musical WHERE Nominee = "Bob Fosse" | musical |
[
"Show all the musical names information.",
"Which of them has the nominee of \"Bob Fosse\"?",
"How about the award of 'Tony Award'?",
"What about the distinct nominees of the musicals with the award that is not that award?"
] | [
"SELECT Name FROM musical",
"SELECT Name FROM musical WHERE Nominee = \"Bob Fosse\"",
"SELECT Name FROM musical WHERE Award = 'Tony Award'",
"SELECT DISTINCT Nominee FROM musical WHERE Award != \"Tony Award\""
] | What are the distinct nominees of the musicals with the award that is not "Tony Award"? | SELECT DISTINCT Nominee FROM musical WHERE Award != "Tony Award" | musical |
[
"List all the names of actors.",
"Show the names of actors and their corresponding musical names."
] | [
"SELECT * FROM actor",
"SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID"
] | Show names of actors and names of musicals they are in. | SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID | musical |
[
"Which actors appeared in musical with name \"Wicked\"?",
"What about \"The Phantom of the Opera\"?"
] | [
"SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"Wicked\"",
"SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"The Phantom of the Opera\""
] | Show names of actors that have appeared in musical with name "The Phantom of the Opera". | SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = "The Phantom of the Opera" | musical |
[
"List the names of actors and their musical names.",
"Order the names of actors in in descending order of the year their musical is awarded."
] | [
"SELECT T1.Name,T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID",
"SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC"
] | Show names of actors in descending order of the year their musical is awarded. | SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC | musical |
[
"Which musical name has two actors?",
"Show each musical name and the number of actors."
] | [
"SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID having count(*) = 2",
"SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID"
] | Show names of musicals and the number of actors who have appeared in the musicals. | SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID | musical |
[
"List the names of actors and their musical names.",
"What are the musical names that have two actors?",
"What about at least three actors?"
] | [
"SELECT T1.Name,T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID",
"SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) = 2",
"SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3"
] | Show names of musicals which have at least three actors. | SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3 | musical |
[
"List all the nominee names.",
"Count how many musicals for each."
] | [
"SELECT Nominee FROM musical",
"SELECT Nominee, count(*) FROM musical GROUP BY Nominee"
] | Show different nominees and the number of musicals they have been nominated. | SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee | musical |
[
"Count how many musicals for each one.",
"Which nominee has 2 musicals?",
"Who has been nominated the greatest number of times?"
] | [
"SELECT Nominee, count(*) FROM musical GROUP BY Nominee",
"SELECT Nominee FROM musical GROUP BY Nominee having count(*) = 2",
"SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1"
] | Please show the nominee who has been nominated the greatest number of times. | SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1 | musical |
[
"List all the results from the musicals.",
"How many are there for each result type?",
"Which one is the most popular result?"
] | [
"SELECT RESULT FROM musical",
"SELECT RESULT, count(*) FROM musical GROUP BY RESULT",
"SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"
] | List the most common result of the musicals. | SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 | musical |
[
"Show all the nominees.",
"Count how many musicals for each one.",
"Which nominee has 5 musicals?",
"How about more than two musicals?"
] | [
"SELECT Nominee FROM musical",
"SELECT Nominee, count(*) FROM musical GROUP BY Nominee",
"SELECT Nominee FROM musical GROUP BY Nominee having count(*) = 5",
"SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2"
] | List the nominees that have been nominated more than two musicals. | SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2 | musical |
[
"List all the information about musicals.",
"Show all the names of musicals which have actors.",
"What about having no actors?"
] | [
"SELECT * FROM musical",
"SELECT Name FROM musical WHERE Musical_ID IN (SELECT Musical_ID FROM actor)",
"SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)"
] | List the name of musicals that do not have actors. | SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor) | musical |
[
"Show all the information about the musical that has the award of 'Tony Award'?",
"What are the nominees with award \"Bob Fosse\" or \"Cleavant Derricks\"?",
"What about both \"Tony Award\" and \"Drama Desk Award\"?"
] | [
"SELECT * FROM musical WHERE Award = 'Tony Award'",
"SELECT Nominee FROM musical WHERE Award = \"Tony Award\" OR Award = \"Cleavant Derricks\"",
"SELECT Nominee FROM musical WHERE Award = \"Tony Award\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"Drama Desk Award\""
] | Show the nominees that have nominated musicals for both "Tony Award" and "Drama Desk Award". | SELECT Nominee FROM musical WHERE Award = "Tony Award" INTERSECT SELECT Nominee FROM musical WHERE Award = "Drama Desk Award" | musical |