input stringlengths 191 7.13k | output stringlengths 19 578 |
|---|---|
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the name of all students who were in the tryout sorted in alphabetic order. [/INST] | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of all students who tried out in alphabetical order? [/INST] | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the name and hours of the students whose tryout decision is yes. [/INST] | SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names and hours spent practicing of every student who received a yes at tryouts? [/INST] | SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the states of the colleges that have students in the tryout who played in striker position. [/INST] | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the states of the colleges where students who tried out for the striker position attend? [/INST] | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the names of the students who are in the position of striker and got a yes tryout decision. [/INST] | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of all students who successfully tried out for the position of striker? [/INST] | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the state of the college which player Charles is attending. [/INST] | 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'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: In which state is the college that Charles attends? [/INST] | 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'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the average and maximum hours for the students whose tryout decision is yes. [/INST] | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the average and maximum number of hours students who made the team practiced? [/INST] | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the average hours for the students whose tryout decision is no. [/INST] | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the average number of hours spent practicing for students who got rejected? [/INST] | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? [/... | 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; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: For each position, what is the maximum number of hours for students who spent more than 1000 hours training? [/INST] | 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; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Which colleges do the tryout players whose name starts with letter D go to? [/INST] | SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Which colleges does each player with a name that starts with the letter D who tried out go to? [/INST] | SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Which college has any student who is a goalie and succeeded in the tryout. [/INST] | SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What college has a student who successfully made the team in the role of a goalie? [/INST] | SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the name of the tryout players who are from the college with largest size. [/INST] | 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); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of all tryout participants who are from the largest college? [/INST] | 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); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. [/INST... | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those coll... | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. [/I... | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: 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 stu... | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the names of schools that have some students playing in goalie and mid positions. [/INST] | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of all schools that have students trying out for the position of goal and 'mid'-field. [/INST] | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the names of states that have some college students playing in goalie and mid positions. [/INST] | 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'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of the states that have some college students playing in the positions of goalie and mid-field? [/INS... | 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'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: How many schools have some students playing in goalie and mid positions. [/INST] | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: How many schools have students playing in goalie and mid-field positions? [/INST] | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the names of schools that have some players in the mid position but not in the goalie position. [/INST] | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of the schools with some players in the mid position but no goalies? [/INST] | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the names of states that have some college students playing in the mid position but not in the goalie position. [/I... | 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'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of all the states with college students playing in the mid position but no goalies? [/INST] | 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'; |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: How many states that have some college students playing in the mid position but not in the goalie position. [/INST] | 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'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the count of states with college students playing in the mid position but not as goalies? [/INST] | 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'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find the states where have the colleges whose enrollments are less than the largest size. [/INST] | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the states with colleges that have enrollments less than the some other college? [/INST] | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find names of colleges with enrollment greater than that of some (at least one) college in the FL state. [/INST] | SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of the colleges that are larger than at least one college in Florida? [/INST] | SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: Find names of all colleges whose enrollment is greater than that of all colleges in the FL state. [/INST] | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What are the names of all colleges with a larger enrollment than the largest college in Florida? [/INST] | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL'); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the total number of enrollment of schools that do not have any goalie player? [/INST] | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie"); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the total number of students enrolled in schools without any goalies? [/INST] | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie"); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the number of states that has some college whose enrollment is larger than the average enrollment? [/INST] | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: How many states have a college with more students than average? [/INST] | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? [/INST] | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college); |
Tables: College, Player, Tryout
Columns: College.cName, College.state, College.enr, Player.pID, Player.pName, Player.yCard, Player.HS, Tryout.pID, Tryout.cName, Tryout.pPos, Tryout.decision
Question: How many states have smaller colleges than average? [/INST] | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college); |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: How many devices are there? [... | SELECT count(*) FROM device; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Count the number of devices. ... | SELECT count(*) FROM device; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: List the carriers of devices ... | SELECT Carrier FROM device ORDER BY Carrier ASC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the different carrie... | SELECT Carrier FROM device ORDER BY Carrier ASC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the carriers of devi... | SELECT Carrier FROM device WHERE Software_Platform != 'Android'; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Return the device carriers th... | SELECT Carrier FROM device WHERE Software_Platform != 'Android'; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the names of shops i... | SELECT Shop_Name FROM shop ORDER BY Open_Year ASC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Return the names of shops, or... | SELECT Shop_Name FROM shop ORDER BY Open_Year ASC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What is the average quantity ... | SELECT avg(Quantity) FROM stock; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Give the average quantity of ... | SELECT avg(Quantity) FROM stock; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the names and locati... | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Return the names and location... | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: How many different software p... | SELECT count(DISTINCT Software_Platform) FROM device; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Count the number of different... | SELECT count(DISTINCT Software_Platform) FROM device; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: List the open date of open ye... | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple"; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the open dates and y... | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple"; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: List the name of the shop wit... | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What is the shop name corresp... | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Show names of shops and the c... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the names of device ... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Show names of shops that have... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the names of shops t... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Show the name of the shop tha... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What is the name of the 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 COUNT(*) DESC LIMIT 1; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Show the name of the shop tha... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What is the name of the 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) DESC LIMIT 1; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Please show different softwar... | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the different softwa... | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Please show the software plat... | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the different softwa... | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: List the software platform sh... | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What is the software platform... | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: List the names of shops that ... | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock); |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the names of shops t... | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock); |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Show the locations shared by ... | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Which locations contains both... | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: List the carriers of devices ... | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock); |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the carriers of devi... | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock); |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: Show the carriers of devices ... | 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; |
Tables: device, shop, stock
Columns: device.Device_ID, device.Device, device.Carrier, device.Package_Version, device.Applications, device.Software_Platform, shop.Shop_ID, shop.Shop_Name, shop.Location, shop.Open_Date, shop.Open_Year, stock.Shop_ID, stock.Device_ID, stock.Quantity
Question: What are the carriers of devi... | 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; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT count(*) FROM BOOKINGS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT count(*) FROM BOOKINGS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT Order_Date FROM BOOKINGS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT Order_Date FROM BOOKINGS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT count(*) FROM CUSTOMERS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT count(*) FROM CUSTOMERS; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"; |
Tables: Ref_Payment_Methods, Ref_Service_Types, Addresses, Products, Marketing_Regions, Clients, Drama_Workshop_Groups, Performers, Customers, Stores, Bookings, Performers_in_Bookings, Customer_Orders, Order_Items, Invoices, Services, Bookings_Services, Invoice_Items
Columns: Ref_Payment_Methods.payment_method_code, Re... | SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.