-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.nhtsa_traffic_fatalities.safetyeq_2018`
(
  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"),
  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"),
  person_number INT64 OPTIONS(description="This data element is the consecutive number assigned to each person in the case (i.e., each occupant, pedestrian, or non-motorists involved in the crash). This data element appears on each person level data file and is used in conjunction with the ST_CASE data element (and sometimes the VEH_NO data element) to merge information from person level data files. 001-999 Assigned Person Number"),
  nm_helmet STRING OPTIONS(description="This data element indicates if the non-motorist was wearing a safety helmet."),
  nm_helmet_name STRING OPTIONS(description="This data element indicates if the non-motorist was wearing a safety helmet."),
  nm_propad STRING OPTIONS(description="This data element indicates if the non-motorist was wearing padded, shaped attachments to protect specific areas of the body (e.g., elbows, knees, shins) from injury."),
  nm_propad_name STRING OPTIONS(description="This data element indicates if the non-motorist was wearing padded, shaped attachments to protect specific areas of the body (e.g., elbows, knees, shins) from injury."),
  nm_othpro STRING OPTIONS(description="This data element indicates if the non-motorist was using protective safety equipment other than a helmet or pads (e.g., eye wear/face shields, gloves, wrist guards)."),
  nm_othpro_name STRING OPTIONS(description="This data element indicates if the non-motorist was using protective safety equipment other than a helmet or pads (e.g., eye wear/face shields, gloves, wrist guards)."),
  nm_refclo STRING OPTIONS(description="This data element indicates if the non-motorist was wearing or carrying some type of reflective item (e.g., jacket, backpack, vest)."),
  nm_refclo_name STRING OPTIONS(description="This data element indicates if the non-motorist was wearing or carrying some type of reflective item (e.g., jacket, backpack, vest)."),
  nm_light STRING OPTIONS(description="This data element indicates if the non-motorist was using a light on his/her person or on a pedalcycle or personal conveyance for safety purposes, to include flashlights."),
  nm_light_name STRING OPTIONS(description="This data element indicates if the non-motorist was using a light on his/her person or on a pedalcycle or personal conveyance for safety purposes, to include flashlights."),
  nm_othpre STRING OPTIONS(description="This data element indicates if the non-motorist was using preventive safety equipment other than a reflective clothing/carried item or light (e.g., bicycle reflectors and flags, reflectors and triangles on a buggy, hi-glo orange clothing, rollerblade stoppers)."),
  nm_othpre_name STRING OPTIONS(description="This data element indicates if the non-motorist was using preventive safety equipment other than a reflective clothing/carried item or light (e.g., bicycle reflectors and flags, reflectors and triangles on a buggy, hi-glo orange clothing, rollerblade stoppers).")
);

INSERT INTO `bigquery-public-data.nhtsa_traffic_fatalities.safetyeq_2018` (state_number, state_name, consecutive_number, vehicle_number, person_number, nm_helmet, nm_helmet_name, nm_propad, nm_propad_name, nm_othpro, nm_othpro_name, nm_refclo, nm_refclo_name, nm_light, nm_light_name, nm_othpre, nm_othpre_name) VALUES (13, 'Georgia', 131135, 0, 1, '1', 'No', '1', 'No', '2', 'Yes', '1', 'No', '1', 'No', '2', 'Yes'), (25, 'Massachusetts', 250239, 0, 1, '1', 'No', '1', 'No', '2', 'Yes', '2', 'Yes', '1', 'No', '1', 'No'), (45, 'South Carolina', 450164, 0, 1, '1', 'No', '1', 'No', '2', 'Yes', '1', 'No', '1', 'No', '1', 'No'), (45, 'South Carolina', 450165, 0, 1, '1', 'No', '1', 'No', '2', 'Yes', '1', 'No', '1', 'No', '1', 'No'), (45, 'South Carolina', 450185, 0, 1, '1', 'No', '1', 'No', '2', 'Yes', '1', 'No', '1', 'No', '1', 'No');