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
Find the name of all students who were in the tryout sorted in alphabetic order.
assistant
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName
human
Find the name and training hours of players whose hours are below 1500.
assistant
SELECT pName , HS FROM Player WHERE HS < 1500
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
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
Find the players whose names contain letter 'a'.
assistant
SELECT DISTINCT pName FROM Player WHERE pName LIKE "%a%" ;