Created
April 30, 2024 16:52
-
-
Save lfy79001/6faf11803e53a70439af40b08c4f3968 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
game_clock, | |
SUM( | |
CASE | |
WHEN team_name = 'Wildcats' THEN points_scored | |
END | |
) OVER(ORDER BY timestamp ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS wildcats_score, | |
SUM( | |
CASE | |
WHEN team_name = 'Fighting Irish' THEN points_scored | |
END | |
) OVER(ORDER BY timestamp ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS fighting_irish_score, | |
team_name, | |
event_description | |
FROM | |
`bigquery-public-data.ncaa_basketball.mbb_pbp_sr` | |
WHERE | |
season = 2014 | |
AND home_name = 'Wildcats' | |
AND away_name = 'Fighting Irish' | |
AND points_scored IS NOT NULL | |
ORDER BY | |
timestamp DESC | |
LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment