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
What are the unique types of player positions in the tryout?
assistant
SELECT count(DISTINCT pPos) FROM tryout
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
Find the name of players whose card is yes in the descending order of training hours.
assistant
SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC
human
What are the names of players whose training hours is between 500 and 1500?
assistant
SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
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
Who are the players that have names containing the letter a?
assistant
SELECT DISTINCT pName FROM Player WHERE pName LIKE "%a%" ;