-- DBMS: bigquery
CREATE TABLE `data-to-insights.ncaa.mbb_historical_tournament_games`
(
  season INT64 OPTIONS(description="Year the game was played in. Note that this is different from the \"season\" values in other tables here, which use academic year."),
  round INT64 OPTIONS(description="Tournament round, indicated by the number of teams playing in that round"),
  days_from_epoch INT64 OPTIONS(description="Days from epoch, as defined in the Kaggle competition (https://www.kaggle.com/c/mens-machine-learning-competition-2018/data)"),
  game_date DATE OPTIONS(description="Date the game was played"),
  day STRING OPTIONS(description="Day of the week the game was played"),
  win_seed STRING OPTIONS(description="Seed of the winning team"),
  win_region STRING OPTIONS(description="Region of the winning team, as defined in the Kaggle competition (https://www.kaggle.com/c/mens-machine-learning-competition-2018/data)"),
  win_market STRING OPTIONS(description="School name (using Sportradar names) of the winning team"),
  win_name STRING OPTIONS(description="Team name of the winning team"),
  win_alias STRING OPTIONS(description="Team alias of the winning team"),
  win_team_id STRING OPTIONS(description="Sportradar team ID of the winning team"),
  win_school_ncaa STRING OPTIONS(description="School name of the winning team (see http://stats.ncaa.org/game_upload/team_codes)"),
  win_code_ncaa INT64 OPTIONS(description="School code of the winning team (see http://stats.ncaa.org/game_upload/team_codes)"),
  win_kaggle_team_id INT64 OPTIONS(description="Kaggle team ID of the winning team"),
  win_pts INT64 OPTIONS(description="Points scored by the winning team"),
  lose_seed STRING OPTIONS(description="Seed of the losing team"),
  lose_region STRING OPTIONS(description="Region of the losing team, as defined in the Kaggle competition (https://www.kaggle.com/c/mens-machine-learning-competition-2018/data)"),
  lose_market STRING OPTIONS(description="School name (using Sportradar names) of the losing team"),
  lose_name STRING OPTIONS(description="Team name of the losing team"),
  lose_alias STRING OPTIONS(description="Team alias of the losing team"),
  lose_team_id STRING OPTIONS(description="Sportradar team ID of the losing team"),
  lose_school_ncaa STRING OPTIONS(description="School name of the losing team (see http://stats.ncaa.org/game_upload/team_codes)"),
  lose_code_ncaa INT64 OPTIONS(description="School code of the losing team (see http://stats.ncaa.org/game_upload/team_codes)"),
  lose_kaggle_team_id INT64 OPTIONS(description="Kaggle team ID of the losing team"),
  lose_pts INT64 OPTIONS(description="Points scored by the losing team"),
  num_ot INT64 OPTIONS(description="Number of overtime periods played in the game"),
  academic_year INT64 OPTIONS(description="The academic year the game was played in")
)
OPTIONS(
  description="Game score information from Men's Basketball games, starting with the 1984-85 tournament. Each row shows one game."
);

INSERT INTO `data-to-insights.ncaa.mbb_historical_tournament_games` (season, round, days_from_epoch, game_date, day, win_seed, win_region, win_market, win_name, win_alias, win_team_id, win_school_ncaa, win_code_ncaa, win_kaggle_team_id, win_pts, lose_seed, lose_region, lose_market, lose_name, lose_alias, lose_team_id, lose_school_ncaa, lose_code_ncaa, lose_kaggle_team_id, lose_pts, num_ot, academic_year) VALUES (1989, 64, 7015, '1989-03-17', 'Friday', '11', 'X', 'Evansville', 'Aces', 'EVAN', 'd8217105-e9c2-4267-9538-3aaeea1ae167', 'Evansville', 219, 1191, 94, '06', 'X', 'Oregon State', 'Beavers', 'ORST', '532d3874-b4b3-4c5c-acc6-749a6db26c8f', 'Oregon St.', 528, 1333, 90, 1, 1988), (1997, 32, 9936, '1997-03-16', 'Sunday', '14', 'X', 'Chattanooga', 'Mocs', 'CHAT', '4c9fb59b-6cec-4b0d-bb0f-628b391d138c', 'Chattanooga', 693, 1151, 75, '06', 'X', 'Illinois', 'Fighting Illini', 'ILL', '150148c2-ca8f-414f-8f41-d94a55d4a122', 'Illinois', 301, 1228, 63, 0, 1996), (1997, 64, 9934, '1997-03-14', 'Friday', '14', 'X', 'Chattanooga', 'Mocs', 'CHAT', '4c9fb59b-6cec-4b0d-bb0f-628b391d138c', 'Chattanooga', 693, 1151, 73, '03', 'X', 'Georgia', 'Bulldogs', 'UGA', '4f4b0771-994c-4126-822d-7525aaa00f65', 'Georgia', 257, 1208, 70, 0, 1996), (1994, 64, 8842, '1994-03-18', 'Friday', '04', 'W', 'Temple', 'Owls', 'TEM', '8598d1b6-106b-4083-a512-2e495729525a', 'Temple', 690, 1396, 61, '13', 'W', 'Drexel', 'Dragons', 'DREX', 'f2d01b77-0f5d-4574-9e49-2a3eaf822e44', 'Drexel', 191, 1180, 39, 0, 1993), (1985, 64, 5551, '1985-03-14', 'Thursday', '08', 'W', 'Temple', 'Owls', 'TEM', '8598d1b6-106b-4083-a512-2e495729525a', 'Temple', 690, 1396, 60, '09', 'W', 'Virginia Tech', 'Hokies', 'VT', '324ccccc-575b-4b82-acb0-fbb8e68da13b', 'Virginia Tech', 742, 1439, 57, 0, 1984);