id int64 0 8.66k | db_id stringclasses 146
values | schema stringclasses 146
values | question stringlengths 3 224 | output stringlengths 18 577 |
|---|---|---|---|---|
5,000 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the name of all students who were in the tryout sorted in alphabetic order. | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName |
5,001 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of all students who tried out in alphabetical order? | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName |
5,002 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the name and hours of the students whose tryout decision is yes. | SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' |
5,003 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names and hours spent practicing of every student who received a yes at tryouts? | SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' |
5,004 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the states of the colleges that have students in the tryout who played in striker position. | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker' |
5,005 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the states of the colleges where students who tried out for the striker position attend? | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker' |
5,006 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the names of the students who are in the position of striker and got a yes tryout decision. | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' |
5,007 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of all students who successfully tried out for the position of striker? | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' |
5,008 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the state of the college which player Charles is attending. | 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' |
5,009 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | In which state is the college that Charles attends? | 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' |
5,010 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the average and maximum hours for the students whose tryout decision is yes. | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' |
5,011 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the average and maximum number of hours students who made the team practiced? | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' |
5,012 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the average hours for the students whose tryout decision is no. | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' |
5,013 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the average number of hours spent practicing for students who got rejected? | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' |
5,014 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? | SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos |
5,015 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | For each position, what is the maximum number of hours for students who spent more than 1000 hours training? | 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 |
5,016 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Which colleges do the tryout players whose name starts with letter D go to? | SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%' |
5,017 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Which colleges does each player with a name that starts with the letter D who tried out go to? | SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%' |
5,018 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Which college has any student who is a goalie and succeeded in the tryout. | SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie' |
5,019 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What college has a student who successfully made the team in the role of a goalie? | SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie' |
5,020 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the name of the tryout players who are from the college with largest size. | 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) |
5,021 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of all tryout participants who are from the largest college? | 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) |
5,022 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' |
5,023 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' |
5,024 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA" |
5,025 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | 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? | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA" |
5,026 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the names of schools that have some students playing in goalie and mid positions. | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' |
5,027 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of all schools that have students trying out for the position of goal and 'mid'-field. | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' |
5,028 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the names of states that have some college students playing in goalie and mid positions. | 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' |
5,029 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of the states that have some college students playing in the positions of goalie and mid-field? | 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' |
5,030 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | How many schools have some students playing in goalie and mid positions. | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') |
5,031 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | How many schools have students playing in goalie and mid-field positions? | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') |
5,032 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the names of schools that have some players in the mid position but not in the goalie position. | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' |
5,033 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of the schools with some players in the mid position but no goalies? | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' |
5,034 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the names of states that have some college students playing in the mid position but not in the goalie position. | 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' |
5,035 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of all the states with college students playing in the mid position but no goalies? | 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' |
5,036 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | How many states that have some college students playing in the mid position but not in the goalie position. | 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') |
5,037 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the count of states with college students playing in the mid position but not as goalies? | 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') |
5,038 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find the states where have the colleges whose enrollments are less than the largest size. | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college) |
5,039 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the states with colleges that have enrollments less than the some other college? | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college) |
5,040 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find names of colleges with enrollment greater than that of some (at least one) college in the FL state. | SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL') |
5,041 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of the colleges that are larger than at least one college in Florida? | SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL') |
5,042 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | Find names of all colleges whose enrollment is greater than that of all colleges in the FL state. | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL') |
5,043 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What are the names of all colleges with a larger enrollment than the largest college in Florida? | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL') |
5,044 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the total number of enrollment of schools that do not have any goalie player? | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") |
5,045 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the total number of students enrolled in schools without any goalies? | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") |
5,046 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the number of states that has some college whose enrollment is larger than the average enrollment? | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college) |
5,047 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | How many states have a college with more students than average? | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college) |
5,048 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college) |
5,049 | soccer_2 | CREATE TABLE College
(
cName varchar(
20
) NOT NULL,
state varchar(
2
),
enr numeric(
5,0
),
PRIMARY KEY (
cName
)
);
CREATE TABLE Player
(
pID numeric(
5,0
) NOT NULL,
pName varchar(
20
),
yCard varchar(
3
),
HS numeric(
... | How many states have smaller colleges than average? | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college) |
5,050 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | How many devices are there? | SELECT count(*) FROM device |
5,051 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Count the number of devices. | SELECT count(*) FROM device |
5,052 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | List the carriers of devices in ascending alphabetical order. | SELECT Carrier FROM device ORDER BY Carrier ASC |
5,053 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the different carriers for devices, listed in alphabetical order? | SELECT Carrier FROM device ORDER BY Carrier ASC |
5,054 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the carriers of devices whose software platforms are not "Android"? | SELECT Carrier FROM device WHERE Software_Platform != 'Android' |
5,055 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Return the device carriers that do not have Android as their software platform. | SELECT Carrier FROM device WHERE Software_Platform != 'Android' |
5,056 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the names of shops in ascending order of open year? | SELECT Shop_Name FROM shop ORDER BY Open_Year ASC |
5,057 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Return the names of shops, ordered by year of opening ascending. | SELECT Shop_Name FROM shop ORDER BY Open_Year ASC |
5,058 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What is the average quantity of stocks? | SELECT avg(Quantity) FROM stock |
5,059 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Give the average quantity of stocks. | SELECT avg(Quantity) FROM stock |
5,060 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the names and location of the shops in ascending alphabetical order of name. | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC |
5,061 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Return the names and locations of shops, ordered by name in alphabetical order. | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC |
5,062 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | How many different software platforms are there for devices? | SELECT count(DISTINCT Software_Platform) FROM device |
5,063 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Count the number of different software platforms. | SELECT count(DISTINCT Software_Platform) FROM device |
5,064 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | List the open date of open year of the shop named "Apple". | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple" |
5,065 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the open dates and years for the shop named Apple? | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple" |
5,066 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | List the name of the shop with the latest open year. | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 |
5,067 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What is the shop name corresponding to the shop that opened in the most recent year? | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 |
5,068 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Show names of shops and the carriers of devices they have in stock. | SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID |
5,069 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the names of device shops, and what are the carriers that they carry devices in stock for? | 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 |
5,070 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Show names of shops that have more than one kind of device in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 |
5,071 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the names of shops that have more than a single kind of device in stock? | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 |
5,072 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Show the name of the shop that has the most kind of devices in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 |
5,073 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What is the name of the shop that has the most different kinds of devices in stock? | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 |
5,074 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Show the name of the shop that have the largest quantity of devices in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 |
5,075 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What is the name of the shop that has the greatest quantity of devices in stock? | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 |
5,076 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Please show different software platforms and the corresponding number of devices using each. | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform |
5,077 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the different software platforms for devices, and how many devices have each? | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform |
5,078 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Please show the software platforms of devices in descending order of the count. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC |
5,079 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the different software platforms for devices, ordered by frequency descending? | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC |
5,080 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | List the software platform shared by the greatest number of devices. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 |
5,081 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What is the software platform that is most common amongst all devices? | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 |
5,082 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | List the names of shops that have no devices in stock. | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) |
5,083 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the names of shops that do not have any devices in stock? | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) |
5,084 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 |
5,085 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Which locations contains both shops that opened after the year 2012 and shops that opened before 2008? | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 |
5,086 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | List the carriers of devices that have no devices in stock. | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock) |
5,087 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the carriers of devices that are not in stock anywhere? | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock) |
5,088 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | Show the carriers of devices in stock at more than one shop. | 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 |
5,089 | device | CREATE TABLE "device" (
"Device_ID" int,
"Device" text,
"Carrier" text,
"Package_Version" text,
"Applications" text,
"Software_Platform" text,
PRIMARY KEY (
"Device_ID"
)
);
CREATE TABLE "shop" (
"Shop_ID" int,
"Shop_Name" text,
"Location" text,
"Open_Date" text,
"Open_Year" int,
PRIMARY KEY (
"Shop... | What are the carriers of devices that are in stock in more than a single shop? | 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 |
5,090 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | How many bookings do we have? | SELECT count(*) FROM BOOKINGS |
5,091 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | Count the total number of bookings made. | SELECT count(*) FROM BOOKINGS |
5,092 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | List the order dates of all the bookings. | SELECT Order_Date FROM BOOKINGS |
5,093 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | What is the order date of each booking? | SELECT Order_Date FROM BOOKINGS |
5,094 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | Show all the planned delivery dates and actual delivery dates of bookings. | SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS |
5,095 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | What are the planned delivery date and actual delivery date for each booking? | SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS |
5,096 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | How many customers do we have? | SELECT count(*) FROM CUSTOMERS |
5,097 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | Count the number of customers recorded. | SELECT count(*) FROM CUSTOMERS |
5,098 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | What are the phone and email for customer Harold? | SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" |
5,099 | cre_Drama_Workshop_Groups | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(
10
) NOT NULL,
payment_method_description VARCHAR(
80
),
PRIMARY KEY (
payment_method_code
),
UNIQUE (
payment_method_code
)
);
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(
15
) NOT NULL,
Parent_Service_Type_Code CH... | Find the phone number and email address of customer "Harold". | SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.