human
Schema:
player (Player_ID, Sponsor_name, Player_name, Gender, Residence, Occupation, Votes, Rank)
club (Club_ID, Club_name, Region, Start_year)
coach (Coach_ID, Coach_name, Gender, Club_ID, Rank)
player_coach (Player_ID, Coach_ID, Starting_year)
match_result (Rank, Club_ID, Gold, Big_Silver, Small_Silver, Bronze, Points)
Please answer with SQL.
assistant
Sure, I understand.
human
List the name and gender of players
assistant
SELECT Player_name , Gender FROM player;
human
How many coaches are there?
assistant
SELECT COUNT( * ) FROM coach;
human
Show the name of each player and also the corresponding coach name of each.
assistant
SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ;