-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.nhtsa_traffic_fatalities.vevent_2017`
(
  state_number INT64 OPTIONS(description="This data element identifies the state in which the crash occurred. The codes are from the General Services Administration’s (GSA) publication of worldwide Geographic Location Codes (GLC). For more info on the codes, please look at <C1/V1/D1/PC1/P1/NM1 State Number> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315"),
  state_name STRING OPTIONS(description="This data element identifies the state in which the crash occurred. The codes are from the General Services Administration’s (GSA) publication of worldwide Geographic Location Codes (GLC)."),
  consecutive_number INT64 OPTIONS(description="This data element is the unique case number assigned to each crash. It appears on each data file and is used to merge information from the data files together. xxxxxx Two Characters for State Code followed by Four Characters for Case Number"),
  event_number INT64 OPTIONS(description="This data element is the consecutive number assigned to each harmful and nonharmful event in a crash, in chronological order. 001-999 Event Number"),
  vehicle_number INT64 OPTIONS(description="This data element is the consecutive number assigned to each vehicle in the case. This data element appears on each vehicle level data file and is used in conjunction with the ST_CASE data element to merge information from vehicle level data files. 000-999 Assigned Number of Motor Vehicle"),
  vehicle_event_number STRING OPTIONS(description="This data element is the consecutive number assigned to each harmful and nonharmful event for this vehicle, in chronological order. 001-999 Vehicle Event Number"),
  vehicle_number_this_vehicle INT64 OPTIONS(description="This data element identifies the “Vehicle Number” (VEH_NO) of this in-transport motor vehicle described in this event. 1-999 Vehicle Number"),
  area_of_impact_this_vehicle INT64 OPTIONS(description="This data element identifies the impact point, if any, on this in-transport motor vehicle that produced property damage or personal injury in this event. For more info on the codes, please look at <C18 Area of Impact (This Vehicle)> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315"),
  area_of_impact_this_vehicle_name STRING OPTIONS(description="This data element identifies the impact point, if any, on this in-transport motor vehicle that produced property damage or personal injury in this event. For more info on the codes, please look at <C18 Area of Impact (This Vehicle)> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315"),
  sequence_of_events INT64 OPTIONS(description="This data element describes this event. A motor vehicle traffic crash is a series of events resulting from an unstabilized situation. This series of harmful and non-harmful events is recorded in chronological order based on the PAR narrative and diagram. For more info on the codes, please look at <V31 Sequence of Events> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315"),
  sequence_of_events_name STRING OPTIONS(description="This data element describes this event. A motor vehicle traffic crash is a series of events resulting from an unstabilized situation. This series of harmful and non-harmful events is recorded in chronological order based on the PAR narrative and diagram. For more info on the codes, please look at <V31 Sequence of Events> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315"),
  vehicle_number_other_vehicle INT64 OPTIONS(description="This data element identifies the “Vehicle Number” (VEH_NO) of the other motor vehicle, if any, in this event. 1-999 Vehicle Number 5555 Non-Harmful Event 9999 Not a Motor Vehicle"),
  vehicle_number_other_vehicle_name STRING OPTIONS(description="This data element identifies the “Vehicle Number” (VEH_NO) of the other motor vehicle, if any, in this event. 1-999 Vehicle Number 5555 Non-Harmful Event 9999 Not a Motor Vehicle"),
  area_of_impact_other_vehicle INT64 OPTIONS(description="This data element identifies the impact point on the other motor vehicle, if any, in this event. For more info on the codes, please look at <C18 Area of Impact (Other Vehicle)> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315"),
  area_of_impact_other_vehicle_name STRING OPTIONS(description="This data element identifies the impact point on the other motor vehicle, if any, in this event. For more info on the codes, please look at <C18 Area of Impact (Other Vehicle)> section in the pdf: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812315")
);

INSERT INTO `bigquery-public-data.nhtsa_traffic_fatalities.vevent_2017` (state_number, state_name, consecutive_number, event_number, vehicle_number, vehicle_event_number, vehicle_number_this_vehicle, area_of_impact_this_vehicle, area_of_impact_this_vehicle_name, sequence_of_events, sequence_of_events_name, vehicle_number_other_vehicle, vehicle_number_other_vehicle_name, area_of_impact_other_vehicle, area_of_impact_other_vehicle_name) VALUES (1, 'Alabama', 10057, 12, 2, '4', 2, 0, 'Non-Collision', 1, 'Rollover/Overturn', 9999, 'Not a Motor Vehicle', 77, 'Not a Motor Vehicle'), (4, 'Arizona', 40417, 10, 1, '10', 1, 0, 'Non-Collision', 1, 'Rollover/Overturn', 9999, 'Not a Motor Vehicle', 77, 'Not a Motor Vehicle'), (4, 'Arizona', 40635, 10, 1, '10', 1, 0, 'Non-Collision', 1, 'Rollover/Overturn', 9999, 'Not a Motor Vehicle', 77, 'Not a Motor Vehicle'), (5, 'Arkansas', 50241, 12, 1, '12', 1, 0, 'Non-Collision', 1, 'Rollover/Overturn', 9999, 'Not a Motor Vehicle', 77, 'Not a Motor Vehicle'), (5, 'Arkansas', 50395, 10, 2, '8', 2, 0, 'Non-Collision', 1, 'Rollover/Overturn', 9999, 'Not a Motor Vehicle', 77, 'Not a Motor Vehicle');