Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This must be done in SQL and must do a,b,c,d. Players(playerlD, playerName, team

ID: 3877095 • Letter: T

Question

This must be done in SQL and must do a,b,c,d.

Players(playerlD, playerName, team, position, birthYear) playerID is a player identifier used in MLB, and all players throughout the history of baseball have a unique ID playerName is player's name team is the name of the MLB team the player is currently playing on (or the last team the player played for if they are not currently playing) position is the position of the player birthYear is the year that player was born · · Teams(teamlD, teamName, home, leagueName) · team!D is a unique ID internal to MLB. o teamName is the name of the team » home is the home city of the team leagueName is the league the team is in, i.e. either "National" or "American", which stands for "National League" and "American League", respectively Games(gamelD, homeTeamID, guestTeamlD, date) · o · game!D is a unique ID used internally in MLB homeTeamID is the ID of the hometeam guestTeamID is the ID of the visiting team date is the date of the game.

Explanation / Answer

a) select playerName from Players , Teams where Players.team = Teams.teamName and

PLayers.birthYear = 1970 ;

b) select team from teamName from Players , Teams where Players.team = Teams.teamName and

(select count(position) from Players where position="pitcher")=0

and (select count(position) from Players where position="pitcher")>0;

c)

select playerName from Players , Teams where Players.team = Teams.teamName and

leagueName = "National League" ;

d) select gameID from Games , Teams where Games.guestTeamID = Teams.teamID

where Teams.teamName = "Yankees" ;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote