leaffan/pynhldb

Shootout attempts/goals assigned to wrong teams in team/game retrieval

leaffan opened this issue · 1 comments

Number of shootout attempts and goals are collected for each team and game if - and only if - a shootout actually happened. A database check has shown that currently team/game items that represent games that didn't even went to a shootout have been assigned shootout characteristics. This is also the case vice versa, i.e. games that went to a shootout have corresponding team/game items without shootout information.

The process of retrieving the shootout information needs to be checked here.

A query to check for the data errors mentioned above:

select
     g.date, g.game_id, t.team_id, t.score,
     g.overtime_game, g.shootout_game,
     t.so_attempts, t.so_goals
from
     nhl.team_games t, nhl.games g
where
     g.game_id = t.game_id and
     g.shootout_game = false/true and
     t.so_attempts is not null/null;