Player Span Stats Finder - Hockey
Current Search
In a span of 5 games, in 2024-25, playing skater, in the regular season, sorted by descending Goals.
THIS QUESTION WAS ANSWERED USING
POWERED BY
Your All Access Pass to the
Hockey
Database
Go beyond the basics. Become a Stathead
Start Your FREE Trial
Display Query »
--------------------------------------
main
Page Setup Time: 0.00112 seconds
WITH
Gamelog AS (
SELECT person_id, year_id, team_id, FIRST_VALUE(date) OVER w as span_start_date_window, LAST_VALUE(date) OVER w as span_end_date_window, ROW_NUMBER() OVER w AS rn, COUNT(*) OVER w AS played_in_span, phase_id, SUM(goals) OVER w AS goals
FROM sup_player_games
JOIN sup_games USING (game_id)
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral, win, loss, tie FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_players USING (person_id)
WHERE is_goalie = 0
AND type=?
AND year_id>=?
AND year_id<=?
AND (forfeit IS NULL OR (forfeit != 'V' AND forfeit != 'H'))
AND date < current_date()
WINDOW w AS (PARTITION BY person_id ORDER BY date ROWS BETWEEN 4 PRECEDING AND CURRENT ROW)
),
span_list AS (
SELECT person_id, played_in_span, span_start_date_window as span_start_date, span_end_date_window as span_end_date
FROM Gamelog
WHERE played_in_span=?
GROUP BY person_id, span_start_date
ORDER BY goals DESC, span_start_date DESC LIMIT 0, 20
)
SELECT name_display, name_display_csk, sup_players.link as name_display_link, person_id, MIN(age_on_day) as age_span_start, span_start_date as span_start_date_csk, span_start_date as span_start_date, span_end_date as span_end_date_csk, span_end_date as span_end_date, GROUP_CONCAT(DISTINCT UPPER(ts.name_abbr)) as teams_played_for_career, 'Games List' as details_games, YEAR(span_start_date) as year_min, SUM(goals IS NULL) as goals_incomplete, SUM(goals) AS goals, SUM(assists IS NULL) as assists_incomplete, SUM(assists) AS assists, SUM(points IS NULL) as points_incomplete, SUM(points) AS points, SUM(plus_minus IS NULL) as plus_minus_incomplete, SUM(plus_minus) AS plus_minus, SUM(pen_min IS NULL) as pen_min_incomplete, SUM(pen_min) AS pen_min, SUM(goals IS NULL)+SUM(goals_sh IS NULL)+SUM(goals_pp IS NULL) as goals_ev_incomplete, SUM(goals - (goals_pp + goals_sh)) AS goals_ev, SUM(goals_pp IS NULL) as goals_pp_incomplete, SUM(goals_pp) AS goals_pp, SUM(goals_sh IS NULL) as goals_sh_incomplete, SUM(goals_sh) AS goals_sh, SUM(goals_gw IS NULL) as goals_gw_incomplete, SUM(goals_gw) AS goals_gw, SUM(shots IS NULL) as shots_incomplete, SUM(shots) AS shots, SUM(time_on_ice)/60 as time_on_ice_csk, SUM(time_on_ice IS NULL) as time_on_ice_incomplete, IF(SUM(st.time_on_ice),CONCAT_WS(':', FLOOR(SUM(st.time_on_ice) / 60), LPAD(IF(ROUND(MOD(SUM(st.time_on_ice), 60)) >= 60, 0, ROUND(MOD(SUM(st.time_on_ice), 60))), 2, '0')),NULL) AS time_on_ice
FROM span_list
JOIN sup_player_games as st USING (person_id)
JOIN sup_games USING (game_id)
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral, win, loss, tie FROM sup_team_games) as tg USING (game_id, team_id)
JOIN (SELECT person_id, year_id, age as age_in_season, comp_id, phase_id, team_id FROM sup_player_team_seasons) as ps2 USING (person_id, year_id, comp_id, phase_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link, comp_id, phase_id FROM sup_team_seasons) as ts USING (team_id, year_id, comp_id, phase_id)
WHERE is_goalie = 0
AND type=?
AND date>=span_start_date
AND date<=span_end_date
GROUP BY person_id, span_start_date, span_end_date
ORDER BY goals DESC, span_start_date_csk DESC, person_id
SQL PARAMS -- $VAR1 = [
'reg',
2025,
2025,
5,
'reg'
];
Query Time: 0.64 seconds
Table Build Time: 0.04 seconds
--------------------------------------
SH->PARAM -- $VAR1 = {
'season_start' => 1,
'season_end' => -1,
'timeframe' => 'seasons',
'order_by' => 'goals',
'rookie' => 'N',
'pos' => 'S',
'span_length' => 5,
'comp_type' => 'reg',
'year_min' => 2025,
'year_max' => 2025,
'match' => 'player_span_game'
};
SH->PARAM_NO_DEFAULT -- $VAR1 = {
'year_min' => 2025,
'year_max' => 2025
};
--------------------------------------
main
Page Setup Time: 0.00112 seconds
WITH
Gamelog AS (
SELECT person_id, year_id, team_id, FIRST_VALUE(date) OVER w as span_start_date_window, LAST_VALUE(date) OVER w as span_end_date_window, ROW_NUMBER() OVER w AS rn, COUNT(*) OVER w AS played_in_span, phase_id, SUM(goals) OVER w AS goals
FROM sup_player_games
JOIN sup_games USING (game_id)
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral, win, loss, tie FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_players USING (person_id)
WHERE is_goalie = 0
AND type=?
AND year_id>=?
AND year_id<=?
AND (forfeit IS NULL OR (forfeit != 'V' AND forfeit != 'H'))
AND date < current_date()
WINDOW w AS (PARTITION BY person_id ORDER BY date ROWS BETWEEN 4 PRECEDING AND CURRENT ROW)
),
span_list AS (
SELECT person_id, played_in_span, span_start_date_window as span_start_date, span_end_date_window as span_end_date
FROM Gamelog
WHERE played_in_span=?
GROUP BY person_id, span_start_date
ORDER BY goals DESC, span_start_date DESC LIMIT 0, 20
)
SELECT name_display, name_display_csk, sup_players.link as name_display_link, person_id, MIN(age_on_day) as age_span_start, span_start_date as span_start_date_csk, span_start_date as span_start_date, span_end_date as span_end_date_csk, span_end_date as span_end_date, GROUP_CONCAT(DISTINCT UPPER(ts.name_abbr)) as teams_played_for_career, 'Games List' as details_games, YEAR(span_start_date) as year_min, SUM(goals IS NULL) as goals_incomplete, SUM(goals) AS goals, SUM(assists IS NULL) as assists_incomplete, SUM(assists) AS assists, SUM(points IS NULL) as points_incomplete, SUM(points) AS points, SUM(plus_minus IS NULL) as plus_minus_incomplete, SUM(plus_minus) AS plus_minus, SUM(pen_min IS NULL) as pen_min_incomplete, SUM(pen_min) AS pen_min, SUM(goals IS NULL)+SUM(goals_sh IS NULL)+SUM(goals_pp IS NULL) as goals_ev_incomplete, SUM(goals - (goals_pp + goals_sh)) AS goals_ev, SUM(goals_pp IS NULL) as goals_pp_incomplete, SUM(goals_pp) AS goals_pp, SUM(goals_sh IS NULL) as goals_sh_incomplete, SUM(goals_sh) AS goals_sh, SUM(goals_gw IS NULL) as goals_gw_incomplete, SUM(goals_gw) AS goals_gw, SUM(shots IS NULL) as shots_incomplete, SUM(shots) AS shots, SUM(time_on_ice)/60 as time_on_ice_csk, SUM(time_on_ice IS NULL) as time_on_ice_incomplete, IF(SUM(st.time_on_ice),CONCAT_WS(':', FLOOR(SUM(st.time_on_ice) / 60), LPAD(IF(ROUND(MOD(SUM(st.time_on_ice), 60)) >= 60, 0, ROUND(MOD(SUM(st.time_on_ice), 60))), 2, '0')),NULL) AS time_on_ice
FROM span_list
JOIN sup_player_games as st USING (person_id)
JOIN sup_games USING (game_id)
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral, win, loss, tie FROM sup_team_games) as tg USING (game_id, team_id)
JOIN (SELECT person_id, year_id, age as age_in_season, comp_id, phase_id, team_id FROM sup_player_team_seasons) as ps2 USING (person_id, year_id, comp_id, phase_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link, comp_id, phase_id FROM sup_team_seasons) as ts USING (team_id, year_id, comp_id, phase_id)
WHERE is_goalie = 0
AND type=?
AND date>=span_start_date
AND date<=span_end_date
GROUP BY person_id, span_start_date, span_end_date
ORDER BY goals DESC, span_start_date_csk DESC, person_id
SQL PARAMS -- $VAR1 = [
'reg',
2025,
2025,
5,
'reg'
];
Query Time: 0.64 seconds
Table Build Time: 0.04 seconds
--------------------------------------
SH->PARAM -- $VAR1 = {
'season_start' => 1,
'season_end' => -1,
'timeframe' => 'seasons',
'order_by' => 'goals',
'rookie' => 'N',
'pos' => 'S',
'span_length' => 5,
'comp_type' => 'reg',
'year_min' => 2025,
'year_max' => 2025,
'match' => 'player_span_game'
};
SH->PARAM_NO_DEFAULT -- $VAR1 = {
'year_min' => 2025,
'year_max' => 2025
};
Data coverage: NHL all-time (since 1917-18) unless otherwise noted. Even Strength, Power Play, and Short-Handed Goals available since 1933-34. Plus/Minus and Shots available since 1959-60. Time on Ice available since 1998-99.


We're Social...for Statheads
Site Last Updated:
Question, Comment, Feedback, or Correction?
Subscribe to our Free Email Newsletter
Do you have a sports website? Or write about sports? We have tools and resources that can help you use sports data. Find out more.