Player Batting Streak Stats Finder - Baseball
Current Search
Longest streak of consecutive games, in 2025, in the regular season, requiring Hits >= 1, sorted by most games matching criteria.
THIS QUESTION WAS ANSWERED USING
POWERED BY
Your All Access Pass to the
Baseball
Database
Go beyond the basics. Become a Stathead
Start Your FREE Trial
Display Query »
--------------------------------------
main
Page Setup Time: 0.00372 seconds
WITH
Meta AS (
SELECT MAX(year_id) as MaxYear, person_id
FROM sup_player_team_seasons
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
WHERE sup_phase_seasons.type=?
GROUP BY person_id
),
Gamelog AS (
SELECT person_id, year_id, team_id, (b_h>=1) as met_criteria, LAG(b_h>=1) OVER w AS lag_met_criteria, LEAD(b_h>=1) OVER w AS lead_met_criteria, ROW_NUMBER() OVER w AS rn, CONCAT(`date`,IF(date_game_number,CONCAT(" (",date_game_number,")"),"")) as date, player_game_num_career, phase_id
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, team_game_num_franchise, 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)
WHERE b_ab + IFNULL(b_sf,0) > 0
AND year_id<=?
AND year_id>=?
AND sup_phase_seasons.type=?
WINDOW w AS (PARTITION BY person_id ORDER BY date, date_game_number )
),
StreakStart AS (
SELECT ROW_NUMBER() OVER w1 AS rownum, Gamelog.rn as rn_start, date AS streak_start_date, person_id, player_game_num_career AS gn_start
FROM Gamelog
WHERE met_criteria = 1
AND (lag_met_criteria = 0 OR lag_met_criteria IS NULL)
WINDOW w1 AS (PARTITION BY person_id ORDER BY date )
),
StreakEnd AS (
SELECT ROW_NUMBER() OVER w2 AS rownum, Gamelog.rn as rn_end, date AS streak_end_date, IF(lead_met_criteria IS NULL AND year_id=MaxYear,1,0) AS active_streak, person_id, player_game_num_career AS gn_end
FROM Gamelog
JOIN Meta USING (person_id)
WHERE met_criteria = 1
AND (lead_met_criteria = 0 OR lead_met_criteria IS NULL)
WINDOW w2 AS (PARTITION BY person_id ORDER BY date )
),
streak_list AS (
SELECT person_id, streak_start_date, streak_end_date, (rn_end - rn_start)+1 as streak_length, active_streak
FROM StreakStart
JOIN StreakEnd USING (person_id, rownum)
WHERE 1
HAVING streak_length>=?
ORDER BY streak_length DESC, streak_end_date DESC LIMIT 0, 20
)
SELECT name_display, name_display_csk, sup_players.link as name_display_link, IF(MIN(age_in_season)=MAX(age_in_season), MIN(age_in_season), CONCAT(MIN(age_in_season), '-', MAX(age_in_season))) as age_range, person_id, streak_length, streak_start_date as streak_start_date_csk, streak_start_date as streak_start_date, streak_end_date as streak_end_date_csk, streak_end_date as streak_end_date, active_streak as active_streak_csk, IF(active_streak=1,'*','') as active_streak, GROUP_CONCAT(DISTINCT UPPER(ts.name_abbr)) as teams_played_for_career, 'Games List' as details_games, SUM(b_pa IS NULL) as b_pa_incomplete, SUM(b_pa) AS b_pa, SUM(b_ab IS NULL) as b_ab_incomplete, SUM(b_ab) AS b_ab, SUM(b_r IS NULL) as b_r_incomplete, SUM(b_r) AS b_r, SUM(b_h IS NULL) as b_h_incomplete, SUM(b_h) AS b_h, SUM(b_h IS NULL)+SUM(b_triples IS NULL)+SUM(b_hr IS NULL)+SUM(b_doubles IS NULL) as b_singles_incomplete, SUM(b_h - (b_doubles + b_triples + b_hr)) AS b_singles, SUM(b_doubles IS NULL) as b_doubles_incomplete, SUM(b_doubles) AS b_doubles, SUM(b_triples IS NULL) as b_triples_incomplete, SUM(b_triples) AS b_triples, SUM(b_hr IS NULL) as b_hr_incomplete, SUM(b_hr) AS b_hr, SUM(b_rbi IS NULL) as b_rbi_incomplete, SUM(b_rbi) AS b_rbi, SUM(b_sb IS NULL) as b_sb_incomplete, SUM(b_sb) AS b_sb, SUM(b_cs IS NULL) as b_cs_incomplete, SUM(b_cs) AS b_cs, SUM(b_bb IS NULL) as b_bb_incomplete, SUM(b_bb) AS b_bb, SUM(b_so IS NULL) as b_so_incomplete, SUM(b_so) AS b_so, SUM(b_triples IS NULL)+SUM(b_doubles IS NULL)+SUM(b_hr IS NULL)+SUM(b_h IS NULL) as b_tb_incomplete, SUM(b_h + b_doubles + 2 * b_triples + 3 * b_hr) AS b_tb, SUM(b_gidp IS NULL) as b_gidp_incomplete, SUM(b_gidp) AS b_gidp, SUM(b_hbp IS NULL) as b_hbp_incomplete, SUM(b_hbp) AS b_hbp, SUM(b_sh IS NULL) as b_sh_incomplete, SUM(b_sh) AS b_sh, SUM(b_sf IS NULL) as b_sf_incomplete, SUM(b_sf) AS b_sf, SUM(b_ibb IS NULL) as b_ibb_incomplete, SUM(b_ibb) AS b_ibb, IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL) + IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL) as b_onbase_plus_slugging_csk, SUM(b_hbp IS NULL)+SUM(b_ab IS NULL)+SUM(b_sf IS NULL)+SUM(b_bb IS NULL)+SUM(b_h IS NULL)+SUM(b_doubles IS NULL)+SUM(b_hr IS NULL)+SUM(b_triples IS NULL) as b_onbase_plus_slugging_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL) + IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL),3)) AS b_onbase_plus_slugging, IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL) as b_slugging_perc_csk, SUM(b_h IS NULL)+SUM(b_doubles IS NULL)+SUM(b_hr IS NULL)+SUM(b_triples IS NULL)+SUM(b_ab IS NULL) as b_slugging_perc_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL),3)) AS b_slugging_perc, IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL) as b_onbase_perc_csk, 0 as b_onbase_perc_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL),3)) AS b_onbase_perc, IF(SUM(b_ab), SUM(b_h) / SUM(b_ab), NULL) as b_batting_avg_csk, SUM(b_h IS NULL)+SUM(b_ab IS NULL) as b_batting_avg_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab), SUM(b_h) / SUM(b_ab), NULL),3)) AS b_batting_avg
FROM streak_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 FROM sup_player_team_seasons GROUP BY person_id, year_id ) as ps2 USING (person_id, year_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 FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
WHERE b_ab + IFNULL(b_sf,0) > 0
AND sup_phase_seasons.type=?
AND CONCAT(`date`,IF(date_game_number,CONCAT(" (",date_game_number,")"),""))>=streak_start_date
AND CONCAT(`date`,IF(date_game_number,CONCAT(" (",date_game_number,")"),""))<=streak_end_date
GROUP BY person_id, streak_start_date, streak_end_date
ORDER BY streak_length DESC, streak_end_date_csk DESC, person_id
SQL PARAMS -- $VAR1 = [
'reg',
2025,
2025,
'reg',
2,
'reg'
];
Query Time: 1.88 seconds
Table Build Time: 0.06 seconds
--------------------------------------
SH->PARAM -- $VAR1 = {
'player_game_min' => 1,
'order_by_asc' => '0',
'playerapp' => 'oneab',
'exactness' => 'anymarked',
'year_max' => 2025,
'max_wind_speed' => 90,
'year_min' => 2025,
'order_by' => 'streak_length',
'match' => 'player_streak_game',
'comp_type' => 'reg',
'GF' => 'anyGF',
'max_temperature' => 120,
'streak_length' => 2,
'player_game_max' => 9999,
'team_game_min' => 1,
'timeframe' => 'seasons',
'team_game_max' => 165
};
SH->PARAM_NO_DEFAULT -- $VAR1 = {
'year_min' => 2025,
'order_by' => 'streak_length',
'order_by_asc' => '0',
'year_max' => 2025
};
--------------------------------------
main
Page Setup Time: 0.00372 seconds
WITH
Meta AS (
SELECT MAX(year_id) as MaxYear, person_id
FROM sup_player_team_seasons
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
WHERE sup_phase_seasons.type=?
GROUP BY person_id
),
Gamelog AS (
SELECT person_id, year_id, team_id, (b_h>=1) as met_criteria, LAG(b_h>=1) OVER w AS lag_met_criteria, LEAD(b_h>=1) OVER w AS lead_met_criteria, ROW_NUMBER() OVER w AS rn, CONCAT(`date`,IF(date_game_number,CONCAT(" (",date_game_number,")"),"")) as date, player_game_num_career, phase_id
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, team_game_num_franchise, 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)
WHERE b_ab + IFNULL(b_sf,0) > 0
AND year_id<=?
AND year_id>=?
AND sup_phase_seasons.type=?
WINDOW w AS (PARTITION BY person_id ORDER BY date, date_game_number )
),
StreakStart AS (
SELECT ROW_NUMBER() OVER w1 AS rownum, Gamelog.rn as rn_start, date AS streak_start_date, person_id, player_game_num_career AS gn_start
FROM Gamelog
WHERE met_criteria = 1
AND (lag_met_criteria = 0 OR lag_met_criteria IS NULL)
WINDOW w1 AS (PARTITION BY person_id ORDER BY date )
),
StreakEnd AS (
SELECT ROW_NUMBER() OVER w2 AS rownum, Gamelog.rn as rn_end, date AS streak_end_date, IF(lead_met_criteria IS NULL AND year_id=MaxYear,1,0) AS active_streak, person_id, player_game_num_career AS gn_end
FROM Gamelog
JOIN Meta USING (person_id)
WHERE met_criteria = 1
AND (lead_met_criteria = 0 OR lead_met_criteria IS NULL)
WINDOW w2 AS (PARTITION BY person_id ORDER BY date )
),
streak_list AS (
SELECT person_id, streak_start_date, streak_end_date, (rn_end - rn_start)+1 as streak_length, active_streak
FROM StreakStart
JOIN StreakEnd USING (person_id, rownum)
WHERE 1
HAVING streak_length>=?
ORDER BY streak_length DESC, streak_end_date DESC LIMIT 0, 20
)
SELECT name_display, name_display_csk, sup_players.link as name_display_link, IF(MIN(age_in_season)=MAX(age_in_season), MIN(age_in_season), CONCAT(MIN(age_in_season), '-', MAX(age_in_season))) as age_range, person_id, streak_length, streak_start_date as streak_start_date_csk, streak_start_date as streak_start_date, streak_end_date as streak_end_date_csk, streak_end_date as streak_end_date, active_streak as active_streak_csk, IF(active_streak=1,'*','') as active_streak, GROUP_CONCAT(DISTINCT UPPER(ts.name_abbr)) as teams_played_for_career, 'Games List' as details_games, SUM(b_pa IS NULL) as b_pa_incomplete, SUM(b_pa) AS b_pa, SUM(b_ab IS NULL) as b_ab_incomplete, SUM(b_ab) AS b_ab, SUM(b_r IS NULL) as b_r_incomplete, SUM(b_r) AS b_r, SUM(b_h IS NULL) as b_h_incomplete, SUM(b_h) AS b_h, SUM(b_h IS NULL)+SUM(b_triples IS NULL)+SUM(b_hr IS NULL)+SUM(b_doubles IS NULL) as b_singles_incomplete, SUM(b_h - (b_doubles + b_triples + b_hr)) AS b_singles, SUM(b_doubles IS NULL) as b_doubles_incomplete, SUM(b_doubles) AS b_doubles, SUM(b_triples IS NULL) as b_triples_incomplete, SUM(b_triples) AS b_triples, SUM(b_hr IS NULL) as b_hr_incomplete, SUM(b_hr) AS b_hr, SUM(b_rbi IS NULL) as b_rbi_incomplete, SUM(b_rbi) AS b_rbi, SUM(b_sb IS NULL) as b_sb_incomplete, SUM(b_sb) AS b_sb, SUM(b_cs IS NULL) as b_cs_incomplete, SUM(b_cs) AS b_cs, SUM(b_bb IS NULL) as b_bb_incomplete, SUM(b_bb) AS b_bb, SUM(b_so IS NULL) as b_so_incomplete, SUM(b_so) AS b_so, SUM(b_triples IS NULL)+SUM(b_doubles IS NULL)+SUM(b_hr IS NULL)+SUM(b_h IS NULL) as b_tb_incomplete, SUM(b_h + b_doubles + 2 * b_triples + 3 * b_hr) AS b_tb, SUM(b_gidp IS NULL) as b_gidp_incomplete, SUM(b_gidp) AS b_gidp, SUM(b_hbp IS NULL) as b_hbp_incomplete, SUM(b_hbp) AS b_hbp, SUM(b_sh IS NULL) as b_sh_incomplete, SUM(b_sh) AS b_sh, SUM(b_sf IS NULL) as b_sf_incomplete, SUM(b_sf) AS b_sf, SUM(b_ibb IS NULL) as b_ibb_incomplete, SUM(b_ibb) AS b_ibb, IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL) + IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL) as b_onbase_plus_slugging_csk, SUM(b_hbp IS NULL)+SUM(b_ab IS NULL)+SUM(b_sf IS NULL)+SUM(b_bb IS NULL)+SUM(b_h IS NULL)+SUM(b_doubles IS NULL)+SUM(b_hr IS NULL)+SUM(b_triples IS NULL) as b_onbase_plus_slugging_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL) + IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL),3)) AS b_onbase_plus_slugging, IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL) as b_slugging_perc_csk, SUM(b_h IS NULL)+SUM(b_doubles IS NULL)+SUM(b_hr IS NULL)+SUM(b_triples IS NULL)+SUM(b_ab IS NULL) as b_slugging_perc_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab), SUM(b_h + b_doubles + (2 * b_triples) + (3 * b_hr)) / SUM(b_ab), NULL),3)) AS b_slugging_perc, IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL) as b_onbase_perc_csk, 0 as b_onbase_perc_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), SUM(b_h + IFNULL(b_bb,0) + IFNULL(b_hbp,0)) / SUM(b_ab + IFNULL(b_bb,0) + IFNULL(b_hbp,0) + IFNULL(b_sf,0)), NULL),3)) AS b_onbase_perc, IF(SUM(b_ab), SUM(b_h) / SUM(b_ab), NULL) as b_batting_avg_csk, SUM(b_h IS NULL)+SUM(b_ab IS NULL) as b_batting_avg_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(b_ab), SUM(b_h) / SUM(b_ab), NULL),3)) AS b_batting_avg
FROM streak_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 FROM sup_player_team_seasons GROUP BY person_id, year_id ) as ps2 USING (person_id, year_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 FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
WHERE b_ab + IFNULL(b_sf,0) > 0
AND sup_phase_seasons.type=?
AND CONCAT(`date`,IF(date_game_number,CONCAT(" (",date_game_number,")"),""))>=streak_start_date
AND CONCAT(`date`,IF(date_game_number,CONCAT(" (",date_game_number,")"),""))<=streak_end_date
GROUP BY person_id, streak_start_date, streak_end_date
ORDER BY streak_length DESC, streak_end_date_csk DESC, person_id
SQL PARAMS -- $VAR1 = [
'reg',
2025,
2025,
'reg',
2,
'reg'
];
Query Time: 1.88 seconds
Table Build Time: 0.06 seconds
--------------------------------------
SH->PARAM -- $VAR1 = {
'player_game_min' => 1,
'order_by_asc' => '0',
'playerapp' => 'oneab',
'exactness' => 'anymarked',
'year_max' => 2025,
'max_wind_speed' => 90,
'year_min' => 2025,
'order_by' => 'streak_length',
'match' => 'player_streak_game',
'comp_type' => 'reg',
'GF' => 'anyGF',
'max_temperature' => 120,
'streak_length' => 2,
'player_game_max' => 9999,
'team_game_min' => 1,
'timeframe' => 'seasons',
'team_game_max' => 165
};
SH->PARAM_NO_DEFAULT -- $VAR1 = {
'year_min' => 2025,
'order_by' => 'streak_length',
'order_by_asc' => '0',
'year_max' => 2025
};
Data coverage: Since 1871. Stats relying on play-by-play data are complete back to 1969, nearly complete back to 1950, and mostly complete back to 1912. Postseason data since 1903. Please see our data coverage page for details.


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.