Created
May 13, 2024 00:27
-
-
Save lfy79001/7da31d4a8c5a76f6dcb37f3b96977935 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 | |
SEASON_ID-20000 AS season, | |
TEAM_ID_HOME AS team_id, | |
TEAM_NAME_HOME AS team_name, | |
FG3_PCT_HOME AS three_point_percentage, | |
COUNT(TEAM_ID_HOME) AS team_game_count, | |
"home" AS game_location | |
FROM Game | |
GROUP BY SEASON_ID, TEAM_ID_HOME | |
UNION | |
SELECT | |
SEASON_ID-20000 AS season, | |
TEAM_ID_AWAY AS team_id, | |
TEAM_NAME_AWAY AS team_name, | |
FG3_PCT_AWAY AS three_point_percentage, | |
COUNT(TEAM_ID_AWAY) AS team_game_count, | |
"away" AS game_location | |
FROM Game | |
GROUP BY SEASON_ID, TEAM_ID_AWAY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment