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 players have more than 1000 hours of training?
assistant
SELECT count(*) FROM Player WHERE HS > 1000
human
Find the players whose names contain letter 'a'.
assistant
SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
human
Find the max, average and min training hours of all players.
assistant
SELECT avg(HS) , max(HS) , min(HS) FROM Player
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 and training hours of players whose hours are below 1500.
assistant
SELECT pName , HS FROM Player WHERE HS < 1500
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 ;