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 a yCard?
assistant
SELECT COUNT( * ) FROM Player WHERE yCard = 'yes';
human
What is the average HS score of all players?
assistant
SELECT AVG ( HS ) FROM Player;
human
Which player has the lowest HS score?
assistant
SELECT pName FROM Player ORDER BY HS ASC LIMIT 1;
human
What is the pID for Andrew?
assistant
SELECT pID FROM Player WHERE pName = 'Andrew';
human
And for Blake?
assistant
SELECT pID FROM Player WHERE pName = 'Blake';
human
How many players are there?
assistant
SELECT COUNT( * ) FROM Player;
human
What are there names?
assistant
SELECT pName FROM Player ;