-- DBMS: bigquery
CREATE TABLE `data-to-insights.ncaa.mbb_pbp_sr`
(
  game_id STRING OPTIONS(description="Unique identifier for the game"),
  load_timestamp TIMESTAMP OPTIONS(description="Time at which the data was loaded into the table"),
  season INT64 OPTIONS(description="Season the game was played in"),
  status STRING OPTIONS(description=""),
  scheduled_date TIMESTAMP OPTIONS(description="Date the game was played"),
  venue_id STRING OPTIONS(description="Unique identifier for the venue where the game was played"),
  venue_name STRING OPTIONS(description="Name of the venue where the game was played"),
  venue_city STRING OPTIONS(description="City where the game was played"),
  venue_state STRING OPTIONS(description="State where the game was played"),
  venue_address STRING OPTIONS(description="Address of the venue where the game was played"),
  venue_zip STRING OPTIONS(description="Zip code of the venue where the game was played"),
  venue_country STRING OPTIONS(description="Country where the game was played"),
  venue_capacity INT64 OPTIONS(description="Current capacity of the venue where the game was played"),
  attendance INT64 OPTIONS(description="Attendance of the game"),
  neutral_site BOOL OPTIONS(description="Boolean value indicating whether the game was played at a neutral site"),
  conference_game BOOL OPTIONS(description="Boolean value indicating whether the two teams were in the same conference at the time the game was played"),
  tournament STRING OPTIONS(description="Indicator of what type of tournament (conference or NCAA) a game was played in, if any"),
  tournament_type STRING OPTIONS(description="Indicator of which conference tournament a game was played in, if any"),
  round STRING OPTIONS(description="Indicator of which tournament round a game was played in, if any"),
  game_no STRING OPTIONS(description="Indicator of which tournament game number a game was, if any"),
  away_market STRING OPTIONS(description="Visiting team school name"),
  away_name STRING OPTIONS(description="Visiting team name"),
  away_id STRING OPTIONS(description="Visiting team school ID from SportRadar (unique)\nTo enable screen reader support, press Ctrl+Alt+Z To learn about keyboard shortcuts, press Ctrl+slash"),
  away_alias STRING OPTIONS(description="Visiting team school alias (unique)"),
  away_conf_name STRING OPTIONS(description="Visiting team current conference name (not unique)"),
  away_conf_alias STRING OPTIONS(description="Visiting team current conference alias (not unique)"),
  away_division_name STRING OPTIONS(description="Visiting team division name (not unique)"),
  away_division_alias STRING OPTIONS(description="Visiting team division alias (not unique)"),
  away_league_name STRING OPTIONS(description="Visiting team school league name (not unique)"),
  home_market STRING OPTIONS(description="Home team school name"),
  home_name STRING OPTIONS(description="Home team name"),
  home_id STRING OPTIONS(description="Home team school ID from SportRadar (unique)"),
  home_alias STRING OPTIONS(description="Home team school alias (unique)"),
  home_conf_name STRING OPTIONS(description="Home team current conference name (not unique)"),
  home_conf_alias STRING OPTIONS(description="Home team current conference alias (not unique)"),
  home_division_name STRING OPTIONS(description="Home team current division name (not unique)"),
  home_division_alias STRING OPTIONS(description="Home team current division alias (not unique)"),
  home_league_name STRING OPTIONS(description="Home team school league name (not unique)"),
  period INT64 OPTIONS(description="This field indicates which period the event occured in. \"1\" is the first 20-minute half, \"2\" is the second 20-minute half, \"3\" is the first OT, \"4\" is the second OT, etc."),
  game_clock STRING OPTIONS(description="Time left in the period in minutes"),
  elapsed_time_sec INT64 OPTIONS(description="Total time elapsed in the game in seconds"),
  possession_arrow STRING OPTIONS(description="The unique identifier of the team that will receive the ball the next time a jump ball is called, see https://en.wikipedia.org/wiki/Jump_ball for more information"),
  team_name STRING OPTIONS(description="Indicator of the school name to which the event was attributed"),
  team_market STRING OPTIONS(description="Indicator of the team name to which the event was attributed"),
  team_id STRING OPTIONS(description="Indicator of the team school ID from SportRadar (unique) to which the event was attributed"),
  team_alias STRING OPTIONS(description="Indicator of the team school alias (unique) to which the event was attributed"),
  team_conf_name STRING OPTIONS(description="Indicator of the team current conference name (not unique) to which the event was attributed"),
  team_conf_alias STRING OPTIONS(description="Indicator of the team current conference alias (not unique) to which the event was attributed"),
  team_division_name STRING OPTIONS(description="Indicator of the team current division name (not unique) to which the event was attributed"),
  team_division_alias STRING OPTIONS(description="Indicator of the team current division alias (not unique) to which the event was attributed"),
  team_league_name STRING OPTIONS(description="Indicator of the team school league name (not unique) to which the event was attributed"),
  team_basket STRING OPTIONS(description="The basket (left or right) that the team to which the event is attributed is attacking"),
  possession_team_id STRING OPTIONS(description="The id of the team that possessed the ball at the end of the play."),
  player_id STRING OPTIONS(description="Unique identifier for the player to whom the event is attributed"),
  player_full_name STRING OPTIONS(description="Name for the player to whom the event is attributed"),
  jersey_num INT64 OPTIONS(description="Jersey number for the player to whom the event is attributed"),
  event_id STRING OPTIONS(description="Unique identifier for the event (\"play\")"),
  timestamp TIMESTAMP OPTIONS(description="The time when the event details were last updated"),
  event_description STRING OPTIONS(description="A description of the event"),
  event_coord_x FLOAT64 OPTIONS(description="The location of the play in number of inches from the \"left\" baseline, max 1128"),
  event_coord_y FLOAT64 OPTIONS(description="The location of the play in inches from the \"top\" sideline, max 600"),
  event_type STRING OPTIONS(description="Category of event"),
  type STRING OPTIONS(description="Event subtype giving additional information about the event"),
  shot_made BOOL OPTIONS(description="Boolean value indicating whether the event was a shot made"),
  shot_type STRING OPTIONS(description="There are 5 categories of shot types: jump shot, layup, hook shot, dunk, tip shot"),
  shot_subtype STRING OPTIONS(description="Additional information about shot type (e.g. fadeaway, floating, pullup, step back, turnaround, alley-oop, driving, finger roll, putback, reverse)"),
  three_point_shot BOOL OPTIONS(description="Boolean value indicating whether the event was a three-point shot attempt"),
  points_scored FLOAT64 OPTIONS(description="Number of points scored on the play"),
  turnover_type STRING OPTIONS(description="Type of turnover"),
  rebound_type STRING OPTIONS(description="Indicator of whether a rebound was offensive or defensive"),
  timeout_duration FLOAT64 OPTIONS(description="Duration of timeout")
)
OPTIONS(
  description="Play-by-play information from men's basketball games, starting with the 2013-14 season. Each row shows a single event in a game. \n\n\nData provided by Sportradar LLC, see www.sportradar.com for more details."
);

INSERT INTO `data-to-insights.ncaa.mbb_pbp_sr` (game_id, load_timestamp, season, status, scheduled_date, venue_id, venue_name, venue_city, venue_state, venue_address, venue_zip, venue_country, venue_capacity, attendance, neutral_site, conference_game, tournament, tournament_type, round, game_no, away_market, away_name, away_id, away_alias, away_conf_name, away_conf_alias, away_division_name, away_division_alias, away_league_name, home_market, home_name, home_id, home_alias, home_conf_name, home_conf_alias, home_division_name, home_division_alias, home_league_name, period, game_clock, elapsed_time_sec, possession_arrow, team_name, team_market, team_id, team_alias, team_conf_name, team_conf_alias, team_division_name, team_division_alias, team_league_name, team_basket, possession_team_id, player_id, player_full_name, jersey_num, event_id, timestamp, event_description, event_coord_x, event_coord_y, event_type, type, shot_made, shot_type, shot_subtype, three_point_shot, points_scored, turnover_type, rebound_type, timeout_duration) VALUES ('60f60dfe-4423-4ef2-9b6c-aee096a0b65c', '2018-02-01 15:40:23.876394+00:00', 2013, 'closed', '2013-12-01 20:00:00+00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5159, False, False, NULL, NULL, NULL, NULL, 'Hardin-Simmons', 'Cowboys', '8fedc1d2-482b-4c00-b581-f0da49935902', 'H-S', 'American Southwest Conference', 'ASC', 'NCAA Division III', 'D3', 'NCAA MEN', 'Baylor', 'Bears', 'db6e1cab-3fa3-4a93-a673-8b2a358ff4bf', 'BAY', 'Big 12', 'BIG12', 'NCAA Division I', 'D1', 'NCAA MEN', 1, '15:36', 264, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'db6e1cab-3fa3-4a93-a673-8b2a358ff4bf', NULL, NULL, NULL, '87e72af7-9cbc-46fd-a9b1-f4e4eff05c30', '2013-12-01 20:13:29+00:00', 'TV timeout', nan, nan, 'tvtimeout', NULL, False, NULL, NULL, False, nan, NULL, NULL, nan), ('552e7365-b6c9-40e7-8c08-e3a97b8c76ad', '2018-02-19 06:29:19.707899+00:00', 2017, 'closed', '2018-02-18 18:00:00+00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10110, False, True, NULL, NULL, NULL, NULL, 'DePaul', 'Blue Demons', 'ee09e6ad-3872-4745-bbb9-ebbd5c6f8318', 'DEP', 'Big East', 'BIGEAST', 'NCAA Division I', 'D1', 'NCAA MEN', 'Seton Hall', 'Pirates', 'aef5e386-d8e8-460c-8014-3a2f090fd988', 'HALL', 'Big East', 'BIGEAST', 'NCAA Division I', 'D1', 'NCAA MEN', 2, '00:39', 2361, 'aef5e386-d8e8-460c-8014-3a2f090fd988', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'right', NULL, NULL, NULL, NULL, '87a29579-646a-4a0b-9285-fb27a709b6d7', '2018-02-18 20:01:32+00:00', 'Blue Demons rebound (deadball)', nan, nan, 'deadball', NULL, False, NULL, NULL, False, nan, NULL, NULL, nan), ('552e7365-b6c9-40e7-8c08-e3a97b8c76ad', '2018-02-19 06:29:19.707899+00:00', 2017, 'closed', '2018-02-18 18:00:00+00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10110, False, True, NULL, NULL, NULL, NULL, 'DePaul', 'Blue Demons', 'ee09e6ad-3872-4745-bbb9-ebbd5c6f8318', 'DEP', 'Big East', 'BIGEAST', 'NCAA Division I', 'D1', 'NCAA MEN', 'Seton Hall', 'Pirates', 'aef5e386-d8e8-460c-8014-3a2f090fd988', 'HALL', 'Big East', 'BIGEAST', 'NCAA Division I', 'D1', 'NCAA MEN', 1, '8:16', 704, 'aef5e386-d8e8-460c-8014-3a2f090fd988', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'right', 'aef5e386-d8e8-460c-8014-3a2f090fd988', NULL, NULL, NULL, '3e9c4b2a-c221-4d77-9370-a23c653efaac', '2018-02-18 18:30:20+00:00', 'Pirates 60 second timeout', 464.0, 273.0, 'teamtimeout', NULL, False, NULL, NULL, False, nan, NULL, NULL, 60.0), ('3d90529c-12ec-40e0-8f31-ddeed234ff76', '2018-02-19 06:29:20.589864+00:00', 2017, 'closed', '2018-02-18 21:00:00+00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9523, False, True, NULL, NULL, NULL, NULL, 'Wichita State', 'Shockers', 'f38b58de-3273-4723-a78b-2f918e9aa2d5', 'WICH', 'American Athletic', 'AAC', 'NCAA Division I', 'D1', 'NCAA MEN', 'Cincinnati', 'Bearcats', 'a17dfc54-415f-49c3-a2e6-d6fa9db18b0a', 'CIN', 'American Athletic', 'AAC', 'NCAA Division I', 'D1', 'NCAA MEN', 1, '3:58', 962, 'a17dfc54-415f-49c3-a2e6-d6fa9db18b0a', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'f38b58de-3273-4723-a78b-2f918e9aa2d5', NULL, NULL, NULL, 'c47f3a11-7d93-4568-b61b-9f25aa0c7406', '2018-02-18 21:43:14+00:00', 'TV timeout', nan, nan, 'tvtimeout', NULL, False, NULL, NULL, False, nan, NULL, NULL, nan), ('3ac25641-fd61-4126-8d43-b375abe8443e', '2018-02-19 06:29:24.684104+00:00', 2017, 'closed', '2018-02-18 18:00:00+00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, False, True, NULL, NULL, NULL, NULL, 'Ohio State', 'Buckeyes', '857462b3-0ab6-4d26-9669-10ca354e382b', 'OSU', 'Big Ten', 'BIG10', 'NCAA Division I', 'D1', 'NCAA MEN', 'Michigan', 'Wolverines', 'bdc2561d-f603-4fab-a262-f1d2af462277', 'MICH', 'Big Ten', 'BIG10', 'NCAA Division I', 'D1', 'NCAA MEN', 2, '4:03', 2157, '857462b3-0ab6-4d26-9669-10ca354e382b', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'right', NULL, NULL, NULL, NULL, 'af92c92f-45c9-4d25-b5bb-81133047f4d5', '2018-02-18 19:55:42+00:00', 'Buckeyes lineup change (Andre Wesson, C.J. Jackson, Kam Williams, Keita Bates-Diop, Kaleb Wesson)', 0.0, 0.0, 'lineupchange', NULL, False, NULL, NULL, False, nan, NULL, NULL, nan);