I have the following tables, Teams and Games. The team table includes the two letter initial of the team that includes the city and nickname as well as the team name. The game table includes the team ID for the teams in the game, the first team ID listed is the home team.
TeamID TeamName DM Dallas Mavericks DN Denver Nuggets DP Detriot Pistons IP Indiana Pacers MG Memphis Grizzles PT Portland Trailblazers
Game_1 Game_2 Game_3 Game_4 Game_5 IP, PT IP, DN IP, MG IP, DP IP, DM DM, PT DM, MG DM, DP NULL NULL MG, DM MG, IP MG, DP MG, PT NULL
I need to be able to answer the following:
Provide the team name for those teams that the Indiana pacers played at home? (should return: Portland Trailblazers, Denver Nuggets, Memphis Grizzles, etc.)
Provide the name of team that had more than 4 home games as well as the number of home games they had (should return Indiana Pacers, 5 and Memphis Grizzles, 4).