human
Schema:
College (cName, state, enr)
Player (pID, pName, yCard, HS)
Tryout (pID, cName, pPos, decision)
Please answer with SQL.
assistant
Sure, I understand.
human
How many students got accepted after the tryout?
assistant
SELECT count(*) FROM tryout WHERE decision = 'yes'
human
Which colleges do the tryout players whose name starts with letter D go to?
assistant
SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'
human
Which college has any student who is a goalie and succeeded in the tryout.
assistant
SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'
human
Find the name of the tryout players who are from the college with largest size.
assistant
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)
human
What are the unique types of player positions in the tryout?
assistant
SELECT count(DISTINCT pPos) FROM tryout
human
What was the most popular position at tryouts?
assistant
SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT( * ) DESC LIMIT 1 ;