output
stringlengths
18
577
instruction
stringlengths
16
224
input
stringclasses
160 values
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName
Find the name of all students who were in the tryout sorted in alphabetic order.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName
What are the names of all students who tried out in alphabetical order?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Find the name and hours of the students whose tryout decision is yes.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
What are the names and hours spent practicing of every student who received a yes at tryouts?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'
Find the states of the colleges that have students in the tryout who played in striker position.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'
What are the states of the colleges where students who tried out for the striker position attend?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'
Find the names of the students who are in the position of striker and got a yes tryout decision.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'
What are the names of all students who successfully tried out for the position of striker?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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'
Find the state of the college which player Charles is attending.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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'
In which state is the college that Charles attends?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Find the average and maximum hours for the students whose tryout decision is yes.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
What is the average and maximum number of hours students who made the team practiced?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'
Find the average hours for the students whose tryout decision is no.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'
What is the average number of hours spent practicing for students who got rejected?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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
What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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
For each position, what is the maximum number of hours for students who spent more than 1000 hours training?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'
Which colleges do the tryout players whose name starts with letter D go to?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'
Which colleges does each player with a name that starts with the letter D who tried out go to?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'
Which college has any student who is a goalie and succeeded in the tryout.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'
What college has a student who successfully made the team in the role of a goalie?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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)
Find the name of the tryout players who are from the college with largest size.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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)
What are the names of all tryout participants who are from the largest college?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"
Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"
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?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'
Find the names of schools that have some students playing in goalie and mid positions.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'
What are the names of all schools that have students trying out for the position of goal and 'mid'-field.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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'
Find the names of states that have some college students playing in goalie and mid positions.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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'
What are the names of the states that have some college students playing in the positions of goalie and mid-field?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')
How many schools have some students playing in goalie and mid positions.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')
How many schools have students playing in goalie and mid-field positions?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'
Find the names of schools that have some players in the mid position but not in the goalie position.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'
What are the names of the schools with some players in the mid position but no goalies?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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'
Find the names of states that have some college students playing in the mid position but not in the goalie position.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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'
What are the names of all the states with college students playing in the mid position but no goalies?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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')
How many states that have some college students playing in the mid position but not in the goalie position.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
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')
What is the count of states with college students playing in the mid position but not as goalies?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)
Find the states where have the colleges whose enrollments are less than the largest size.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)
What are the states with colleges that have enrollments less than the some other college?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')
Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')
What are the names of the colleges that are larger than at least one college in Florida?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')
Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')
What are the names of all colleges with a larger enrollment than the largest college in Florida?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie")
What is the total number of enrollment of schools that do not have any goalie player?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie")
What is the total number of students enrolled in schools without any goalies?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)
What is the number of states that has some college whose enrollment is larger than the average enrollment?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)
How many states have a college with more students than average?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)
What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)
How many states have smaller colleges than average?
"Schema (values (type))": College : cName (text) , state (text) , enr (number) | Player : pID (number) , pName (text) , yCard (text) , HS (number) | Tryout : pID (number) , cName (text) , pPos (text) , decision (text) "Primary Keys": College : cName | Player : pID | Tryout : pID "Foreign Keys": Tryout : cName equals College : cName | Tryout : pID equals Player : pID
SELECT count(*) FROM device
How many devices are there?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT count(*) FROM device
Count the number of devices.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Carrier FROM device ORDER BY Carrier ASC
List the carriers of devices in ascending alphabetical order.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Carrier FROM device ORDER BY Carrier ASC
What are the different carriers for devices, listed in alphabetical order?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Carrier FROM device WHERE Software_Platform != 'Android'
What are the carriers of devices whose software platforms are not "Android"?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Carrier FROM device WHERE Software_Platform != 'Android'
Return the device carriers that do not have Android as their software platform.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Shop_Name FROM shop ORDER BY Open_Year ASC
What are the names of shops in ascending order of open year?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Shop_Name FROM shop ORDER BY Open_Year ASC
Return the names of shops, ordered by year of opening ascending.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT avg(Quantity) FROM stock
What is the average quantity of stocks?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT avg(Quantity) FROM stock
Give the average quantity of stocks.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC
Return the names and locations of shops, ordered by name in alphabetical order.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT count(DISTINCT Software_Platform) FROM device
How many different software platforms are there for devices?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT count(DISTINCT Software_Platform) FROM device
Count the number of different software platforms.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple"
List the open date of open year of the shop named "Apple".
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple"
What are the open dates and years for the shop named Apple?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1
List the name of the shop with the latest open year.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1
What is the shop name corresponding to the shop that opened in the most recent year?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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
What are the names of device shops, and what are the carriers that they carry devices in stock for?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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 COUNT(*) > 1
Show names of shops that have more than one kind of device in stock.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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 COUNT(*) > 1
What are the names of shops that have more than a single kind of device in stock?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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 ORDER BY COUNT(*) DESC LIMIT 1
Show the name of the shop that has the most kind of devices in stock.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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 ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the shop that has the most different kinds of devices in stock?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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 ORDER BY SUM(T1.quantity) DESC LIMIT 1
Show the name of the shop that have the largest quantity of devices in stock.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : 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 ORDER BY SUM(T1.quantity) DESC LIMIT 1
What is the name of the shop that has the greatest quantity of devices in stock?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform
Please show different software platforms and the corresponding number of devices using each.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform
What are the different software platforms for devices, and how many devices have each?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC
What are the different software platforms for devices, ordered by frequency descending?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1
What is the software platform that is most common amongst all devices?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)
What are the names of shops that do not have any devices in stock?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008
Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_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.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)
What are the carriers of devices that are not in stock anywhere?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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
Show the carriers of devices in stock at more than one shop.
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
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
What are the carriers of devices that are in stock in more than a single shop?
"Schema (values (type))": device : Device_ID (number) , Device (text) , Carrier (text) , Package_Version (text) , Applications (text) , Software_Platform (text) | shop : Shop_ID (number) , Shop_Name (text) , Location (text) , Open_Date (text) , Open_Year (number) | stock : Shop_ID (number) , Device_ID (number) , Quantity (number) "Primary Keys": device : Device_ID | shop : Shop_ID | stock : Shop_ID "Foreign Keys": stock : Device_ID equals device : Device_ID | stock : Shop_ID equals shop : Shop_ID
SELECT count(*) FROM BOOKINGS
How many bookings do we have?
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT count(*) FROM BOOKINGS
Count the total number of bookings made.
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT Order_Date FROM BOOKINGS
List the order dates of all the bookings.
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT Order_Date FROM BOOKINGS
What is the order date of each booking?
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS
Show all the planned delivery dates and actual delivery dates of bookings.
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS
What are the planned delivery date and actual delivery date for each booking?
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT count(*) FROM CUSTOMERS
How many customers do we have?
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT count(*) FROM CUSTOMERS
Count the number of customers recorded.
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"
What are the phone and email for customer Harold?
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID
SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"
Find the phone number and email address of customer "Harold".
"Schema (values (type))": Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : Service_Type_Code (text) , Parent_Service_Type_Code (text) , Service_Type_Description (text) | Addresses : Address_ID (text) , Line_1 (text) , Line_2 (text) , City_Town (text) , State_County (text) , Other_Details (text) | Products : Product_ID (text) , Product_Name (text) , Product_Price (number) , Product_Description (text) , Other_Product_Service_Details (text) | Marketing_Regions : Marketing_Region_Code (text) , Marketing_Region_Name (text) , Marketing_Region_Descriptrion (text) , Other_Details (text) | Clients : Client_ID (number) , Address_ID (number) , Customer_Email_Address (text) , Customer_Name (text) , Customer_Phone (text) , Other_Details (text) | Drama_Workshop_Groups : Workshop_Group_ID (number) , Address_ID (number) , Currency_Code (text) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Performers : Performer_ID (number) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Customers : Customer_ID (text) , Address_ID (number) , Customer_Name (text) , Customer_Phone (text) , Customer_Email_Address (text) , Other_Details (text) | Stores : Store_ID (text) , Address_ID (number) , Marketing_Region_Code (text) , Store_Name (text) , Store_Phone (text) , Store_Email_Address (text) , Other_Details (text) | Bookings : Booking_ID (number) , Customer_ID (number) , Workshop_Group_ID (text) , Status_Code (text) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Performers_in_Bookings : Order_ID (number) , Performer_ID (number) | Customer_Orders : Order_ID (number) , Customer_ID (number) , Store_ID (number) , Order_Date (time) , Planned_Delivery_Date (time) , Actual_Delivery_Date (time) , Other_Order_Details (text) | Order_Items : Order_Item_ID (number) , Order_ID (number) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) | Invoices : Invoice_ID (number) , Order_ID (number) , payment_method_code (text) , Product_ID (number) , Order_Quantity (text) , Other_Item_Details (text) , Order_Item_ID (number) | Services : Service_ID (number) , Service_Type_Code (text) , Workshop_Group_ID (number) , Product_Description (text) , Product_Name (text) , Product_Price (number) , Other_Product_Service_Details (text) | Bookings_Services : Order_ID (number) , Product_ID (number) | Invoice_Items : Invoice_Item_ID (number) , Invoice_ID (number) , Order_ID (number) , Order_Item_ID (number) , Product_ID (number) , Order_Quantity (number) , Other_Item_Details (text) "Primary Keys": Ref_Payment_Methods : payment_method_code | Ref_Service_Types : Service_Type_Code | Addresses : Address_ID | Products : Product_ID | Marketing_Regions : Marketing_Region_Code | Clients : Client_ID | Drama_Workshop_Groups : Workshop_Group_ID | Performers : Performer_ID | Customers : Customer_ID | Stores : Store_ID | Bookings : Booking_ID | Performers_in_Bookings : Order_ID | Customer_Orders : Order_ID | Order_Items : Order_Item_ID | Invoices : Invoice_ID | Services : Service_ID | Bookings_Services : Order_ID | Invoice_Items : Invoice_Item_ID "Foreign Keys": Clients : Address_ID equals Addresses : Address_ID | Drama_Workshop_Groups : Address_ID equals Addresses : Address_ID | Performers : Address_ID equals Addresses : Address_ID | Customers : Address_ID equals Addresses : Address_ID | Stores : Marketing_Region_Code equals Marketing_Regions : Marketing_Region_Code | Stores : Address_ID equals Addresses : Address_ID | Bookings : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings : Customer_ID equals Clients : Client_ID | Performers_in_Bookings : Order_ID equals Bookings : Booking_ID | Performers_in_Bookings : Performer_ID equals Performers : Performer_ID | Customer_Orders : Store_ID equals Stores : Store_ID | Customer_Orders : Customer_ID equals Customers : Customer_ID | Order_Items : Product_ID equals Products : Product_ID | Order_Items : Order_ID equals Customer_Orders : Order_ID | Invoices : payment_method_code equals Ref_Payment_Methods : payment_method_code | Invoices : Order_ID equals Bookings : Booking_ID | Invoices : Order_ID equals Customer_Orders : Order_ID | Services : Service_Type_Code equals Ref_Service_Types : Service_Type_Code | Services : Workshop_Group_ID equals Drama_Workshop_Groups : Workshop_Group_ID | Bookings_Services : Product_ID equals Services : Service_ID | Bookings_Services : Order_ID equals Bookings : Booking_ID | Invoice_Items : Order_ID equals Bookings_Services : Order_ID | Invoice_Items : Product_ID equals Bookings_Services : Product_ID | Invoice_Items : Invoice_ID equals Invoices : Invoice_ID | Invoice_Items : Order_Item_ID equals Order_Items : Order_Item_ID