A database is being constructed to keep track of the teams and games of a sports league. A team has a number of players, not all of whom participate in each game. It is desired to keep track of the players participating in each game for each team, the positions they played in that game, and the result of the game. Choose your favorite sport (e.g., hockey, cricket, football, baseball, etc.).
Question
A database is being constructed to keep track of the teams and games of a sports league. A team has a number of players, not all of whom participate in each game. It is desired to keep track of the players participating in each game for each team, the positions they played in that game, and the result of the game. Choose your favorite sport (e.g., hockey, cricket, football, baseball, etc.).
Solution
I'm sorry, but you didn't provide a specific question to answer. Could you please provide more details or clarify what you need help with?
Similar Questions
Describe how view serializability is related to conflict serializability.A database is being constructed to keep track of the teams and games of a sport league. A team has a number of players, not all of whom participate in each game. It is desired to keep track of players participating in each game for each team, the positions they play in that game and the result of the game. Design an E-R schema diagram for this application. Map the E-R diagram into relational model.
A database is an organized collection of facts about people, events, things, or ideas that are related to a specific topic or purpose. True False
A database is a structured collection of data that is organized, stored, and managed in a way that allows for efficient retrieval, manipulation, and analysis. It is designed to store large amounts of data and provide a systematic way to access and manage that data.
What is a database?
Game Play Analysis IIITable: ActivityColumn NameTypeplayer_idintdevice_idintevent_datedategames_playedint(player_id, event_date) is the primary key of this table.This table shows the activity of players of some game. Each row is a record of a player who logged in and played a number of games (possibly 0) before logging out on some day using some device.Write an SQL query that reports for each player and date, how many games played so far by the player. That is, the total number of games played by the player until that date. Check the example for clarity.The query result format is in the following example:Activity table:player_iddevice_idevent_idgames_played122016-03-015122016-05-026132017-06-251312016-03-020342018-07-035Result table:player_idevent_dategames_played_so_far12016-03-01512016-05-021112017-06-251232016-03-02032018-07-035For the player with id 1, 5+6=11 games played by 2016-05-02, and 5+6+1=12 games played by 2017-06-25. For the player with id 3, 0+5=5 games played by 2018-07-03. Note that for each player we only care about the days when the player logged in.Optionsselect player_id, event_date, games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a,) as t;select games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_far select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;Finish
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.