-- DBMS: bigquery
CREATE TABLE `data-to-insights.ncaa.mbb_players_games_sr`
(
  game_id STRING OPTIONS(description="[Game data] Unique identifier for the game"),
  season INT64 OPTIONS(description="[Game data] Season the game was played in"),
  neutral_site BOOL OPTIONS(description="[Game data] Indicator of whether the game was played on a neutral court"),
  scheduled_date DATE OPTIONS(description="[Game data] Date the game was played"),
  gametime TIMESTAMP OPTIONS(description="[Game data] Date and time the game was played"),
  tournament STRING OPTIONS(description="[Game data] Whether the game was played in a post-season tournament"),
  tournament_type STRING OPTIONS(description="[Game data] Type of post-season tournament a game was in played"),
  tournament_round STRING OPTIONS(description="[Game data] Tournament round"),
  tournament_game_no STRING OPTIONS(description="[Game data] Tournament game number"),
  player_id STRING OPTIONS(description="[Player info] Player Sportradar player ID"),
  last_name STRING OPTIONS(description="[Player info] Player last name"),
  first_name STRING OPTIONS(description="[Player info] Player first name"),
  full_name STRING OPTIONS(description="[Player info] Player full name"),
  abbr_name STRING OPTIONS(description="[Player info] Player abbreviated name (\"F.Last\")"),
  status STRING OPTIONS(description="[Player info] Player status as of 2017-18 season"),
  jersey_number INT64 OPTIONS(description="[Player info] Player jersey number"),
  height INT64 OPTIONS(description="[Player info] Player height"),
  weight INT64 OPTIONS(description="[Player info] Player weight"),
  birth_place STRING OPTIONS(description="[Player info] Player birth place or home (Note: this information comes from the school's website, via Sportradar. While many of these entries indicate the player's birthplace, some of them may instead indicate the town that the players most identifies with.)"),
  birthplace_city STRING OPTIONS(description="[Player info] Player's home city (Note: this information comes from the school's website, via Sportradar. While many of these entries indicate the player's birthplace, some of them may instead indicate the town that the players most identifies with.)"),
  birthplace_state STRING OPTIONS(description="[Player info] Player's home state (Note: this information comes from the school's website, via Sportradar. While many of these entries indicate the player's birthplace, some of them may instead indicate the town that the players most identifies with.)"),
  birthplace_country STRING OPTIONS(description="[Player info] Player's home country (Note: this information comes from the school's website, via Sportradar. While many of these entries indicate the player's birthplace, some of them may instead indicate the town that the players most identifies with.)"),
  class STRING OPTIONS(description="[Player info] Player's class at game time (Note: this information comes from the school's website, via Sportradar.)"),
  team_name STRING OPTIONS(description="[Team info] Team name"),
  team_market STRING OPTIONS(description="[Team info] Team school name (using Sportradar names)"),
  team_id STRING OPTIONS(description="[Team info] Sportradar team ID"),
  team_alias STRING OPTIONS(description="[Team info] Team alias"),
  conf_name STRING OPTIONS(description="[Team info] Team current conference name"),
  conf_alias STRING OPTIONS(description="[Team info] Team current conference alias"),
  division_name STRING OPTIONS(description="[Team info] Team current division name"),
  division_alias STRING OPTIONS(description="[Team info] Team current division alias"),
  league_name STRING OPTIONS(description="[Team info] Team current league name"),
  home_team BOOL OPTIONS(description="[Team info] Indicator of whether the team was the home team"),
  active BOOL OPTIONS(description="[Player stats] Indicator of whether the player was active for the game"),
  played BOOL OPTIONS(description="[Player stats] Indicator of whether the player played in the game"),
  starter BOOL OPTIONS(description="[Player stats] Indicator of whether the player started the game"),
  minutes STRING OPTIONS(description="[Player stats] Minutes played"),
  minutes_int64 INT64 OPTIONS(description="[Player stats] Minutes played (as integer)"),
  position STRING OPTIONS(description="[Player stats] Position"),
  primary_position STRING OPTIONS(description="[Player stats] Primary position"),
  field_goals_made INT64 OPTIONS(description="[Player stats] Field goals made"),
  field_goals_att INT64 OPTIONS(description="[Player stats] Field goals attempted"),
  field_goals_pct FLOAT64 OPTIONS(description="[Player stats] Field goal percentage"),
  three_points_made INT64 OPTIONS(description="[Player stats] Three-pointers made"),
  three_points_att INT64 OPTIONS(description="[Player stats] Three-pointers attempted"),
  three_points_pct FLOAT64 OPTIONS(description="[Player stats] Three-point shot percentage"),
  two_points_made INT64 OPTIONS(description="[Player stats] Two-pointers made"),
  two_points_att INT64 OPTIONS(description="[Player stats] Two-pointers attempted"),
  two_points_pct FLOAT64 OPTIONS(description="[Player stats] Two-point shot percentage"),
  blocked_att INT64 OPTIONS(description="[Player stats] Number of shots blocked by the other team"),
  free_throws_made INT64 OPTIONS(description="[Player stats] Free throws made"),
  free_throws_att INT64 OPTIONS(description="[Player stats] Free throws attempted"),
  free_throws_pct FLOAT64 OPTIONS(description="[Player stats] Free throw percentage"),
  offensive_rebounds INT64 OPTIONS(description="[Player stats] Offensive rebounds"),
  defensive_rebounds INT64 OPTIONS(description="[Player stats] Defensive rebounds"),
  rebounds INT64 OPTIONS(description="[Player stats] Total rebounds"),
  assists INT64 OPTIONS(description="[Player stats] Assists"),
  turnovers INT64 OPTIONS(description="[Player stats] Turnovers"),
  steals INT64 OPTIONS(description="[Player stats] Steals"),
  blocks INT64 OPTIONS(description="[Player stats] Blocks"),
  assists_turnover_ratio FLOAT64 OPTIONS(description="[Player stats] Assist-to-turnover ratio"),
  personal_fouls INT64 OPTIONS(description="[Player stats] Personal fouls committed"),
  tech_fouls INT64 OPTIONS(description="[Player stats] Technical fouls committed"),
  flagrant_fouls INT64 OPTIONS(description="[Player stats] Flagrant fouls committed"),
  points INT64 OPTIONS(description="[Player stats] Points scored"),
  sp_created TIMESTAMP OPTIONS(description="[Table data] Box score data entry time")
)
OPTIONS(
  description="Player-level box scores from every men's basketball game from the 2013-14 season to the 2017-18 season. Each row shows a single player's stats in one game.\n\nData provided by Sportradar LLC, see www.sportradar.com for more details."
);

INSERT INTO `data-to-insights.ncaa.mbb_players_games_sr` (game_id, season, neutral_site, scheduled_date, gametime, tournament, tournament_type, tournament_round, tournament_game_no, player_id, last_name, first_name, full_name, abbr_name, status, jersey_number, height, weight, birth_place, birthplace_city, birthplace_state, birthplace_country, class, team_name, team_market, team_id, team_alias, conf_name, conf_alias, division_name, division_alias, league_name, home_team, active, played, starter, minutes, minutes_int64, position, primary_position, field_goals_made, field_goals_att, field_goals_pct, three_points_made, three_points_att, three_points_pct, two_points_made, two_points_att, two_points_pct, blocked_att, free_throws_made, free_throws_att, free_throws_pct, offensive_rebounds, defensive_rebounds, rebounds, assists, turnovers, steals, blocks, assists_turnover_ratio, personal_fouls, tech_fouls, flagrant_fouls, points, sp_created) VALUES ('14ab9c26-b586-4f68-8989-f433bb3a3e7f', 2017, False, '2017-11-22', '2017-11-22 00:00:00+00:00', NULL, NULL, NULL, NULL, 'b8df0122-7f1e-4189-a47b-1e08050bf6c6', 'Mersch', 'Nick', 'Nick Mersch', NULL, NULL, 41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0496c4c9-37a7-48db-ae81-c42eeb2de5fc', NULL, NULL, NULL, NULL, NULL, NULL, False, True, False, False, NULL, NULL, 'F', 'NA', NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, '2018-02-20 13:03:24+00:00'), ('64667cdd-9379-4ecc-877a-3fb4d76fbff2', 2017, False, '2017-12-19', '2017-12-19 01:00:00+00:00', NULL, NULL, NULL, NULL, '2036297a-f0e1-4d65-8cc2-94d3d4de314f', 'Weber', 'Ben', 'Ben Weber', NULL, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '3572adb4-ffa8-4eb7-a74d-c154831ab1ef', NULL, NULL, NULL, NULL, NULL, NULL, False, True, False, False, NULL, NULL, 'G', 'NA', NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, '2018-02-20 13:03:27+00:00'), ('fcc2decd-b14f-4fed-8a78-8856c6689c74', 2017, False, '2017-11-12', '2017-11-12 18:00:00+00:00', NULL, NULL, NULL, NULL, 'c367fd91-183a-4d7d-9307-b8a289cb7bc9', 'Nascimento', 'Robert', 'Robert Nascimento', NULL, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'dbd3591c-a49c-49da-ab52-a364a1b2e032', NULL, NULL, NULL, NULL, NULL, NULL, False, True, False, False, NULL, NULL, 'F-C', 'NA', NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, '2018-02-20 13:03:23+00:00'), ('7cda8dca-e87b-4b4e-9eed-68cfba948957', 2017, False, '2017-11-26', '2017-11-26 21:30:00+00:00', NULL, NULL, NULL, NULL, '0ca3800d-fb89-4151-90c0-a3e03835fd04', 'Wilson-Poston', 'Chris', 'Chris Wilson-Poston', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '3572adb4-ffa8-4eb7-a74d-c154831ab1ef', NULL, NULL, NULL, NULL, NULL, NULL, False, True, False, False, NULL, NULL, 'F', 'NA', NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, '2018-02-20 13:03:26+00:00'), ('b3b15b00-c5a6-4239-9c99-713ebe01b8c7', 2017, False, '2018-01-24', '2018-01-24 01:00:00+00:00', NULL, NULL, NULL, NULL, '269dc916-2208-40e2-a5ee-062a38a3a00d', 'Gray', 'Jordan', 'Jordan Gray', NULL, NULL, 22, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '61b1208b-044c-45b5-852e-0b8c737c23f4', NULL, NULL, NULL, NULL, NULL, NULL, False, True, False, False, NULL, NULL, 'G', 'NA', NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, nan, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL, NULL, NULL, '2018-02-20 13:03:21+00:00');