vendredi 27 février 2015

SQL select distinct join issue


Vote count:

0




I have a set of tables that have MLB data. The question is: List the team name, manager first name, and manager last name for all managers who manage teams in the NL Central (‘NL’ league and ‘C’ division).


If I enter: select mlb_team.name from mlb_team where league = 'NL' and division = 'C'; I can get the five names of the teams that are NL C division.


If I try to display the manager names, I get over 160 total results. I have to join three tables. mlb_master has the first and last names that connects to mlb_manager through player_id. mlb_manager connects to mlb_team through team_id.



asked 54 secs ago







SQL select distinct join issue

Aucun commentaire:

Enregistrer un commentaire