Write the SQL command for following i) Teams ( Teamcode , Teamname, Clubname, total_member, dateofstart, teammanager,teamcoach) ii) Players (Teamcode, playername, dateofbirth, specialposition, Numberofgoal, number of tournaments, Tshirtno) iii) Tournament (Tournament_code, Tname, Year, Hostcountry, numberofteams, winnerteam, goldenboot) iv) Tournament_teams (Tournament_code, teamcode, totalyellocard, totalredcard, numberofgoals) v) Matchdetail (tournament_code, Mtcode, Team1code,team2code, winnerteamecode, matchdate ,team1goal,team2goal,refree) a) Write commands to create the above tables. Teamcode in player table is primary key. Teamcode in players, tournament_Team table is foreign key. b) Show the players of winner team of the year 2010. c) Show the team details of the team which got maximum yellocard. d) Show the team name of the team which won with maximum goal difference with the opposite team in a match. e) Show the details of the oldest team
Write the SQL command for following
i) Teams ( Teamcode , Teamname, Clubname, total_member, dateofstart, teammanager,teamcoach)
ii) Players (Teamcode, playername, dateofbirth, specialposition, Numberofgoal, number of tournaments, Tshirtno)
iii) Tournament (Tournament_code, Tname, Year, Hostcountry, numberofteams, winnerteam, goldenboot)
iv) Tournament_teams (Tournament_code, teamcode, totalyellocard, totalredcard, numberofgoals)
v) Matchdetail (tournament_code, Mtcode, Team1code,team2code, winnerteamecode, matchdate ,team1goal,team2goal,refree)
a) Write commands to create the above tables.
Teamcode in player table is primary key.
Teamcode in players, tournament_Team table is foreign key.
b) Show the players of winner team of the year 2010.
c) Show the team details of the team which got maximum yellocard.
d) Show the team name of the team which won with maximum goal difference with the opposite team in a match.
e) Show the details of the oldest team
Step by step
Solved in 2 steps with 7 images