human
Schema:
club (Club_ID, name, Region, Start_year)
club_rank (Rank, Club_ID, Gold, Silver, Bronze, Total)
player (Player_ID, name, Position, Club_ID, Apps, Tries, Goals, Points)
competition (Competition_ID, Year, Competition_type, Country)
competition_result (Competition_ID, Club_ID_1, Club_ID_2, Score)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the club names?
assistant
SELECT name FROM CLub;
human
How many of them have at least one player?
assistant
SELECT COUNT( name ) FROM CLub WHERE Club_ID IN ( SELECT Club_ID FROM player );
human
Which ones have no players at all?
assistant
SELECT name FROM CLub WHERE Club_ID NOT IN ( SELECT Club_ID FROM player ) ;