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 information is there on students who spent more than 1000 hours training?
assistant
SELECT * FROM player WHERE HS > 1000;
human
For each position, how many hours did each student spent training?
assistant
SELECT T1.HS , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID GROUP BY T2.pPos;
human
What was the maximum time spent for each position?
assistant
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 ;