messages
list |
---|
[
{
"content": "Find the name of all students who were in the tryout sorted in alphabetic order.",
"role": "user"
},
{
"content": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all students who tried out in alphabetical order?",
"role": "user"
},
{
"content": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName",
"role": "assistant"
}
]
|
[
{
"content": "Find the name and hours of the students whose tryout decision is yes.",
"role": "user"
},
{
"content": "SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names and hours spent practicing of every student who received a yes at tryouts?",
"role": "user"
},
{
"content": "SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'",
"role": "assistant"
}
]
|
[
{
"content": "Find the states of the colleges that have students in the tryout who played in striker position.",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'",
"role": "assistant"
}
]
|
[
{
"content": "What are the states of the colleges where students who tried out for the striker position attend?",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of the students who are in the position of striker and got a yes tryout decision.",
"role": "user"
},
{
"content": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all students who successfully tried out for the position of striker?",
"role": "user"
},
{
"content": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'",
"role": "assistant"
}
]
|
[
{
"content": "Find the state of the college which player Charles is attending.",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'",
"role": "assistant"
}
]
|
[
{
"content": "In which state is the college that Charles attends?",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'",
"role": "assistant"
}
]
|
[
{
"content": "Find the average and maximum hours for the students whose tryout decision is yes.",
"role": "user"
},
{
"content": "SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'",
"role": "assistant"
}
]
|
[
{
"content": "What is the average and maximum number of hours students who made the team practiced?",
"role": "user"
},
{
"content": "SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'",
"role": "assistant"
}
]
|
[
{
"content": "Find the average hours for the students whose tryout decision is no.",
"role": "user"
},
{
"content": "SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'",
"role": "assistant"
}
]
|
[
{
"content": "What is the average number of hours spent practicing for students who got rejected?",
"role": "user"
},
{
"content": "SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'",
"role": "assistant"
}
]
|
[
{
"content": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?",
"role": "user"
},
{
"content": "SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos",
"role": "assistant"
}
]
|
[
{
"content": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?",
"role": "user"
},
{
"content": "SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos",
"role": "assistant"
}
]
|
[
{
"content": "Which colleges do the tryout players whose name starts with letter D go to?",
"role": "user"
},
{
"content": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'",
"role": "assistant"
}
]
|
[
{
"content": "Which colleges does each player with a name that starts with the letter D who tried out go to?",
"role": "user"
},
{
"content": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'",
"role": "assistant"
}
]
|
[
{
"content": "Which college has any student who is a goalie and succeeded in the tryout.",
"role": "user"
},
{
"content": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'",
"role": "assistant"
}
]
|
[
{
"content": "What college has a student who successfully made the team in the role of a goalie?",
"role": "user"
},
{
"content": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'",
"role": "assistant"
}
]
|
[
{
"content": "Find the name of the tryout players who are from the college with largest size.",
"role": "user"
},
{
"content": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all tryout participants who are from the largest college?",
"role": "user"
},
{
"content": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)",
"role": "assistant"
}
]
|
[
{
"content": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.",
"role": "user"
},
{
"content": "SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'",
"role": "assistant"
}
]
|
[
{
"content": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?",
"role": "user"
},
{
"content": "SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.",
"role": "user"
},
{
"content": "SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?",
"role": "user"
},
{
"content": "SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of schools that have some students playing in goalie and mid positions.",
"role": "user"
},
{
"content": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.",
"role": "user"
},
{
"content": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of states that have some college students playing in goalie and mid positions.",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'",
"role": "assistant"
}
]
|
[
{
"content": "How many schools have some students playing in goalie and mid positions.",
"role": "user"
},
{
"content": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')",
"role": "assistant"
}
]
|
[
{
"content": "How many schools have students playing in goalie and mid-field positions?",
"role": "user"
},
{
"content": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of schools that have some players in the mid position but not in the goalie position.",
"role": "user"
},
{
"content": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the schools with some players in the mid position but no goalies?",
"role": "user"
},
{
"content": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of states that have some college students playing in the mid position but not in the goalie position.",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all the states with college students playing in the mid position but no goalies?",
"role": "user"
},
{
"content": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'",
"role": "assistant"
}
]
|
[
{
"content": "How many states that have some college students playing in the mid position but not in the goalie position.",
"role": "user"
},
{
"content": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')",
"role": "assistant"
}
]
|
[
{
"content": "What is the count of states with college students playing in the mid position but not as goalies?",
"role": "user"
},
{
"content": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')",
"role": "assistant"
}
]
|
[
{
"content": "Find the states where have the colleges whose enrollments are less than the largest size.",
"role": "user"
},
{
"content": "SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)",
"role": "assistant"
}
]
|
[
{
"content": "What are the states with colleges that have enrollments less than the some other college?",
"role": "user"
},
{
"content": "SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)",
"role": "assistant"
}
]
|
[
{
"content": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.",
"role": "user"
},
{
"content": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the colleges that are larger than at least one college in Florida?",
"role": "user"
},
{
"content": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')",
"role": "assistant"
}
]
|
[
{
"content": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.",
"role": "user"
},
{
"content": "SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all colleges with a larger enrollment than the largest college in Florida?",
"role": "user"
},
{
"content": "SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')",
"role": "assistant"
}
]
|
[
{
"content": "What is the total number of enrollment of schools that do not have any goalie player?",
"role": "user"
},
{
"content": "SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")",
"role": "assistant"
}
]
|
[
{
"content": "What is the total number of students enrolled in schools without any goalies?",
"role": "user"
},
{
"content": "SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")",
"role": "assistant"
}
]
|
[
{
"content": "What is the number of states that has some college whose enrollment is larger than the average enrollment?",
"role": "user"
},
{
"content": "SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)",
"role": "assistant"
}
]
|
[
{
"content": "How many states have a college with more students than average?",
"role": "user"
},
{
"content": "SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)",
"role": "assistant"
}
]
|
[
{
"content": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?",
"role": "user"
},
{
"content": "SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)",
"role": "assistant"
}
]
|
[
{
"content": "How many states have smaller colleges than average?",
"role": "user"
},
{
"content": "SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)",
"role": "assistant"
}
]
|
[
{
"content": "How many devices are there?",
"role": "user"
},
{
"content": "SELECT count(*) FROM device",
"role": "assistant"
}
]
|
[
{
"content": "Count the number of devices.",
"role": "user"
},
{
"content": "SELECT count(*) FROM device",
"role": "assistant"
}
]
|
[
{
"content": "List the carriers of devices in ascending alphabetical order.",
"role": "user"
},
{
"content": "SELECT Carrier FROM device ORDER BY Carrier ASC",
"role": "assistant"
}
]
|
[
{
"content": "What are the different carriers for devices, listed in alphabetical order?",
"role": "user"
},
{
"content": "SELECT Carrier FROM device ORDER BY Carrier ASC",
"role": "assistant"
}
]
|
[
{
"content": "What are the carriers of devices whose software platforms are not \"Android\"?",
"role": "user"
},
{
"content": "SELECT Carrier FROM device WHERE Software_Platform != 'Android'",
"role": "assistant"
}
]
|
[
{
"content": "Return the device carriers that do not have Android as their software platform.",
"role": "user"
},
{
"content": "SELECT Carrier FROM device WHERE Software_Platform != 'Android'",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of shops in ascending order of open year?",
"role": "user"
},
{
"content": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC",
"role": "assistant"
}
]
|
[
{
"content": "Return the names of shops, ordered by year of opening ascending.",
"role": "user"
},
{
"content": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC",
"role": "assistant"
}
]
|
[
{
"content": "What is the average quantity of stocks?",
"role": "user"
},
{
"content": "SELECT avg(Quantity) FROM stock",
"role": "assistant"
}
]
|
[
{
"content": "Give the average quantity of stocks.",
"role": "user"
},
{
"content": "SELECT avg(Quantity) FROM stock",
"role": "assistant"
}
]
|
[
{
"content": "What are the names and location of the shops in ascending alphabetical order of name.",
"role": "user"
},
{
"content": "SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC",
"role": "assistant"
}
]
|
[
{
"content": "Return the names and locations of shops, ordered by name in alphabetical order.",
"role": "user"
},
{
"content": "SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC",
"role": "assistant"
}
]
|
[
{
"content": "How many different software platforms are there for devices?",
"role": "user"
},
{
"content": "SELECT count(DISTINCT Software_Platform) FROM device",
"role": "assistant"
}
]
|
[
{
"content": "Count the number of different software platforms.",
"role": "user"
},
{
"content": "SELECT count(DISTINCT Software_Platform) FROM device",
"role": "assistant"
}
]
|
[
{
"content": "List the open date of open year of the shop named \"Apple\".",
"role": "user"
},
{
"content": "SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the open dates and years for the shop named Apple?",
"role": "user"
},
{
"content": "SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\"",
"role": "assistant"
}
]
|
[
{
"content": "List the name of the shop with the latest open year.",
"role": "user"
},
{
"content": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What is the shop name corresponding to the shop that opened in the most recent year?",
"role": "user"
},
{
"content": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "Show names of shops and the carriers of devices they have in stock.",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of device shops, and what are the carriers that they carry devices in stock for?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "Show names of shops that have more than one kind of device in stock.",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of shops that have more than a single kind of device in stock?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "Show the name of the shop that has the most kind of devices in stock.",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What is the name of the shop that has the most different kinds of devices in stock?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "Show the name of the shop that have the largest quantity of devices in stock.",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What is the name of the shop that has the greatest quantity of devices in stock?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "Please show different software platforms and the corresponding number of devices using each.",
"role": "user"
},
{
"content": "SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform",
"role": "assistant"
}
]
|
[
{
"content": "What are the different software platforms for devices, and how many devices have each?",
"role": "user"
},
{
"content": "SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform",
"role": "assistant"
}
]
|
[
{
"content": "Please show the software platforms of devices in descending order of the count.",
"role": "user"
},
{
"content": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC",
"role": "assistant"
}
]
|
[
{
"content": "What are the different software platforms for devices, ordered by frequency descending?",
"role": "user"
},
{
"content": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC",
"role": "assistant"
}
]
|
[
{
"content": "List the software platform shared by the greatest number of devices.",
"role": "user"
},
{
"content": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What is the software platform that is most common amongst all devices?",
"role": "user"
},
{
"content": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "List the names of shops that have no devices in stock.",
"role": "user"
},
{
"content": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of shops that do not have any devices in stock?",
"role": "user"
},
{
"content": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)",
"role": "assistant"
}
]
|
[
{
"content": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.",
"role": "user"
},
{
"content": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008",
"role": "assistant"
}
]
|
[
{
"content": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?",
"role": "user"
},
{
"content": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008",
"role": "assistant"
}
]
|
[
{
"content": "List the carriers of devices that have no devices in stock.",
"role": "user"
},
{
"content": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)",
"role": "assistant"
}
]
|
[
{
"content": "What are the carriers of devices that are not in stock anywhere?",
"role": "user"
},
{
"content": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)",
"role": "assistant"
}
]
|
[
{
"content": "Show the carriers of devices in stock at more than one shop.",
"role": "user"
},
{
"content": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1",
"role": "assistant"
}
]
|
[
{
"content": "What are the carriers of devices that are in stock in more than a single shop?",
"role": "user"
},
{
"content": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1",
"role": "assistant"
}
]
|
[
{
"content": "How many bookings do we have?",
"role": "user"
},
{
"content": "SELECT count(*) FROM BOOKINGS",
"role": "assistant"
}
]
|
[
{
"content": "Count the total number of bookings made.",
"role": "user"
},
{
"content": "SELECT count(*) FROM BOOKINGS",
"role": "assistant"
}
]
|
[
{
"content": "List the order dates of all the bookings.",
"role": "user"
},
{
"content": "SELECT Order_Date FROM BOOKINGS",
"role": "assistant"
}
]
|
[
{
"content": "What is the order date of each booking?",
"role": "user"
},
{
"content": "SELECT Order_Date FROM BOOKINGS",
"role": "assistant"
}
]
|
[
{
"content": "Show all the planned delivery dates and actual delivery dates of bookings.",
"role": "user"
},
{
"content": "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS",
"role": "assistant"
}
]
|
[
{
"content": "What are the planned delivery date and actual delivery date for each booking?",
"role": "user"
},
{
"content": "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS",
"role": "assistant"
}
]
|
[
{
"content": "How many customers do we have?",
"role": "user"
},
{
"content": "SELECT count(*) FROM CUSTOMERS",
"role": "assistant"
}
]
|
[
{
"content": "Count the number of customers recorded.",
"role": "user"
},
{
"content": "SELECT count(*) FROM CUSTOMERS",
"role": "assistant"
}
]
|
[
{
"content": "What are the phone and email for customer Harold?",
"role": "user"
},
{
"content": "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"",
"role": "assistant"
}
]
|
[
{
"content": "Find the phone number and email address of customer \"Harold\".",
"role": "user"
},
{
"content": "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"",
"role": "assistant"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.