-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.san_francisco_transit_muni.vehicle_monitoring`
(
  time_recorded TIMESTAMP OPTIONS(description="The timestamp of the last real-time update from the particular vehicle."),
  route_id STRING OPTIONS(description="Unique reference for the route on which the vehicle is traveling. Maps to route_id in the routes table"),
  direction STRING OPTIONS(description="Indicates the direction of travel for a trip. The following values are valid:   -  O: Outbound travel -  I: Inbound travel  This field is not used in routing, but instead provides a way to separate trips by direction"),
  trip_date DATE OPTIONS(description="The service date for the trip the vehicle is serving."),
  trip_id STRING OPTIONS(description="Unique reference for the trip that the vehicle is traveling. Maps to trip_id in the trips table"),
  route_long_name STRING OPTIONS(description="Contains the full name of a route. This name is generally more descriptive than the name from route_short_name and often includes the route's destination or stop. Maps to route_long_name in routes table"),
  vehicle_location_lat FLOAT64 OPTIONS(description="The latitude of the vehicle's location at the time when time_recorded indicates"),
  vehicle_location_lon FLOAT64 OPTIONS(description="The longitude of the vehicle's location at the time when time_recorded indicates"),
  vehicle_location GEOGRAPHY OPTIONS(description="The geographic representation of the vehicle's location at the time indicated in the time_recorded column"),
  vehicle_id STRING OPTIONS(description="The unique identifier of the vehicle to be monitored."),
  next_stop_id STRING OPTIONS(description="Unique reference for the stop being monitored. Maps to stop_id in the stops table"),
  next_stop_name STRING OPTIONS(description="Full text name of the stop being monitored. Maps to stop_name in the stops table"),
  next_stop_expected_arrival_time TIMESTAMP OPTIONS(description="Estimated arrival time at the next stop"),
  next_stop_aimed_arrival_time TIMESTAMP OPTIONS(description="Aimed arrival time at the next stop"),
  next_stop_expected_departure_time TIMESTAMP OPTIONS(description="Estimated departure time from the next stop"),
  next_stop_aimed_departure_time TIMESTAMP OPTIONS(description="Aimed departure time from the next stop"),
  onward_stop_id_1 STRING OPTIONS(description="Unique reference for onward stop 1. Maps to stop_id in the stops table"),
  onward_stop_name_1 STRING OPTIONS(description="Full text name of onward stop 1. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_1 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 1"),
  onward_stop_aimed_arrival_time_1 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 1"),
  onward_stop_aimed_departure_time_1 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 1"),
  onward_stop_id_2 STRING OPTIONS(description="Unique reference for onward stop 2. Maps to stop_id in the stops table"),
  onward_stop_name_2 STRING OPTIONS(description="Full text name of onward stop 2. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_2 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 2"),
  onward_stop_aimed_arrival_time_2 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 2"),
  onward_stop_aimed_departure_time_2 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 2"),
  onward_stop_id_3 STRING OPTIONS(description="Unique reference for onward stop 3. Maps to stop_id in the stops table"),
  onward_stop_name_3 STRING OPTIONS(description="Full text name of onward stop 3. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_3 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 3"),
  onward_stop_aimed_arrival_time_3 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 3"),
  onward_stop_aimed_departure_time_3 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 3"),
  onward_stop_id_4 STRING OPTIONS(description="Unique reference for onward stop 4. Maps to stop_id in the stops table"),
  onward_stop_name_4 STRING OPTIONS(description="Full text name of onward stop 4. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_4 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 4"),
  onward_stop_aimed_arrival_time_4 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 4"),
  onward_stop_aimed_departure_time_4 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 4"),
  onward_stop_id_5 STRING OPTIONS(description="Unique reference for onward stop 5. Maps to stop_id in the stops table"),
  onward_stop_name_5 STRING OPTIONS(description="Full text name of onward stop 5. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_5 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 5"),
  onward_stop_aimed_arrival_time_5 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 5"),
  onward_stop_aimed_departure_time_5 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 5"),
  onward_stop_id_6 STRING OPTIONS(description="Unique reference for onward stop 6. Maps to stop_id in the stops table"),
  onward_stop_name_6 STRING OPTIONS(description="Full text name of onward stop 6. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_6 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 6"),
  onward_stop_aimed_arrival_time_6 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 6"),
  onward_stop_aimed_departure_time_6 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 6"),
  onward_stop_id_7 STRING OPTIONS(description="Unique reference for onward stop 7. Maps to stop_id in the stops table"),
  onward_stop_name_7 STRING OPTIONS(description="Full text name of onward stop 7. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_7 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 7"),
  onward_stop_aimed_arrival_time_7 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 7"),
  onward_stop_aimed_departure_time_7 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 7"),
  onward_stop_id_8 STRING OPTIONS(description="Unique reference for onward stop 8. Maps to stop_id in the stops table"),
  onward_stop_name_8 STRING OPTIONS(description="Full text name of onward stop 8. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_8 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 8"),
  onward_stop_aimed_arrival_time_8 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 8"),
  onward_stop_aimed_departure_time_8 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 8"),
  onward_stop_id_9 STRING OPTIONS(description="Unique reference for onward stop 9. Maps to stop_id in the stops table"),
  onward_stop_name_9 STRING OPTIONS(description="Full text name of onward stop 9. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_9 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 9"),
  onward_stop_aimed_arrival_time_9 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 9"),
  onward_stop_aimed_departure_time_9 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 9"),
  onward_stop_id_10 STRING OPTIONS(description="Unique reference for onward stop 10. Maps to stop_id in the stops table"),
  onward_stop_name_10 STRING OPTIONS(description="Full text name of onward stop 10. Maps to stop_name in the stops table"),
  onward_stop_expected_arrival_time_10 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 10"),
  onward_stop_aimed_arrival_time_10 TIMESTAMP OPTIONS(description="Estimated arrival time at onward stop 10"),
  onward_stop_aimed_departure_time_10 TIMESTAMP OPTIONS(description="Aimed departure time from onward stop 10")
);

INSERT INTO `bigquery-public-data.san_francisco_transit_muni.vehicle_monitoring` (time_recorded, route_id, direction, trip_date, trip_id, route_long_name, vehicle_location_lat, vehicle_location_lon, vehicle_location, vehicle_id, next_stop_id, next_stop_name, next_stop_expected_arrival_time, next_stop_aimed_arrival_time, next_stop_expected_departure_time, next_stop_aimed_departure_time, onward_stop_id_1, onward_stop_name_1, onward_stop_expected_arrival_time_1, onward_stop_aimed_arrival_time_1, onward_stop_aimed_departure_time_1, onward_stop_id_2, onward_stop_name_2, onward_stop_expected_arrival_time_2, onward_stop_aimed_arrival_time_2, onward_stop_aimed_departure_time_2, onward_stop_id_3, onward_stop_name_3, onward_stop_expected_arrival_time_3, onward_stop_aimed_arrival_time_3, onward_stop_aimed_departure_time_3, onward_stop_id_4, onward_stop_name_4, onward_stop_expected_arrival_time_4, onward_stop_aimed_arrival_time_4, onward_stop_aimed_departure_time_4, onward_stop_id_5, onward_stop_name_5, onward_stop_expected_arrival_time_5, onward_stop_aimed_arrival_time_5, onward_stop_aimed_departure_time_5, onward_stop_id_6, onward_stop_name_6, onward_stop_expected_arrival_time_6, onward_stop_aimed_arrival_time_6, onward_stop_aimed_departure_time_6, onward_stop_id_7, onward_stop_name_7, onward_stop_expected_arrival_time_7, onward_stop_aimed_arrival_time_7, onward_stop_aimed_departure_time_7, onward_stop_id_8, onward_stop_name_8, onward_stop_expected_arrival_time_8, onward_stop_aimed_arrival_time_8, onward_stop_aimed_departure_time_8, onward_stop_id_9, onward_stop_name_9, onward_stop_expected_arrival_time_9, onward_stop_aimed_arrival_time_9, onward_stop_aimed_departure_time_9, onward_stop_id_10, onward_stop_name_10, onward_stop_expected_arrival_time_10, onward_stop_aimed_arrival_time_10, onward_stop_aimed_departure_time_10) VALUES ('2021-12-12 07:57:44+00:00', 'J', 'IB', '2021-12-11', '10419857', 'CHURCH', 37.755066, -122.42756, 'POINT(-122.427559 37.7550659)', '1431', '13994', 'Church St & 22nd St', '2021-12-12 07:57:13+00:00', '2021-12-12 07:55:41+00:00', 'NaT', '2021-12-12 07:55:41+00:00', 'Right Of Way/21st St', '16217', '2021-12-12 07:58:03+00:00', '2021-12-12 07:56:42+00:00', '2021-12-12 07:56:42+00:00', 'Right Of Way/Liberty St', '16222', '2021-12-12 07:58:26+00:00', '2021-12-12 07:57:08+00:00', '2021-12-12 07:57:08+00:00', 'Right Of Way/20th St', '16215', '2021-12-12 07:59:20+00:00', '2021-12-12 07:57:54+00:00', '2021-12-12 07:57:54+00:00', 'Right Of Way/18th St', '16213', '2021-12-12 08:01:01+00:00', '2021-12-12 07:59:29+00:00', '2021-12-12 07:59:29+00:00', 'Church St & 16th St', '13985', '2021-12-12 08:02:30+00:00', '2021-12-12 08:01:13+00:00', '2021-12-12 08:01:13+00:00', 'Church St & Market St', '17073', '2021-12-12 08:04:28+00:00', '2021-12-12 08:02:53+00:00', '2021-12-12 08:02:53+00:00', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT'), ('2021-12-12 07:57:44+00:00', 'N', 'IB', '2021-12-11', '10420258', 'JUDAH', 37.79409, -122.39519, 'POINT(-122.395187 37.7940903)', '1442', '14509', 'The Embarcadero & Folsom St', '2021-12-12 07:59:07+00:00', '2021-12-12 07:58:00+00:00', 'NaT', '2021-12-12 07:58:00+00:00', 'The Embarcadero & Brannan St', '14506', '2021-12-12 08:00:35+00:00', '2021-12-12 08:01:38+00:00', '2021-12-12 08:01:38+00:00', 'King St & 2nd St', '15234', '2021-12-12 08:02:28+00:00', '2021-12-12 08:04:25+00:00', '2021-12-12 08:04:25+00:00', 'King St & 4th St', '15239', '2021-12-12 08:06:21+00:00', '2021-12-12 08:07:00+00:00', '2021-12-12 08:07:00+00:00', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT'), ('2021-12-12 07:57:44+00:00', 'M', 'IB', '2021-12-11', '10421885', 'OCEAN VIEW', 37.78916, -122.40135, 'POINT(-122.401352 37.7891617)', '1464', '15731', 'Metro Montgomery Station/Downtown', '2021-12-12 07:58:08+00:00', '2021-12-12 07:56:54+00:00', 'NaT', '2021-12-12 07:56:54+00:00', 'Metro Embarcadero Station', '16992', '2021-12-12 08:00:00+00:00', '2021-12-12 07:58:00+00:00', '2021-12-12 07:58:00+00:00', 'The Embarcadero & Folsom St', '14509', '2021-12-12 08:02:10+00:00', '2021-12-12 08:01:00+00:00', '2021-12-12 08:01:00+00:00', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT'), ('2021-12-12 07:57:44+00:00', 'M', 'OB', '2021-12-11', '10421801', 'OCEAN VIEW', 37.71404, -122.46267, 'POINT(-122.462669 37.7140388)', '1488', '15825', 'Orizaba Ave & Broad St', '2021-12-12 07:57:54+00:00', '2021-12-12 07:54:55+00:00', 'NaT', '2021-12-12 07:54:55+00:00', 'Broad St & Capitol Ave', '13716', '2021-12-12 07:58:54+00:00', '2021-12-12 07:56:02+00:00', '2021-12-12 07:56:02+00:00', 'Broad St & Plymouth Ave', '13719', '2021-12-12 07:59:40+00:00', '2021-12-12 07:57:00+00:00', '2021-12-12 07:57:00+00:00', 'San Jose Ave & Farallones St', '16259', '2021-12-12 08:01:15+00:00', '2021-12-12 07:58:45+00:00', '2021-12-12 07:58:45+00:00', 'San Jose Ave & Lakeview Ave', '16266', '2021-12-12 08:02:08+00:00', '2021-12-12 08:00:06+00:00', '2021-12-12 08:00:06+00:00', 'San Jose Ave & Mt Vernon Ave', '16268', '2021-12-12 08:03:06+00:00', '2021-12-12 08:01:30+00:00', '2021-12-12 08:01:30+00:00', 'San Jose Ave & Niagra Ave', '16269', '2021-12-12 08:04:32+00:00', '2021-12-12 08:02:17+00:00', '2021-12-12 08:02:17+00:00', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT'), ('2021-12-12 07:57:44+00:00', '22', 'OB', '2021-12-11', '10326759', 'FILLMORE', 37.766224, -122.400024, 'POINT(-122.400024 37.7662239)', '5710', '17763', '16th St & Missouri St', '2021-12-12 07:57:28+00:00', '2021-12-12 07:55:00+00:00', 'NaT', '2021-12-12 07:55:00+00:00', '16th St & Owen St', '17866', '2021-12-12 07:58:10+00:00', '2021-12-12 07:56:17+00:00', '2021-12-12 07:56:17+00:00', '16th St & 4th St', '17764', '2021-12-12 07:58:26+00:00', '2021-12-12 07:56:48+00:00', '2021-12-12 07:56:48+00:00', '3rd St & Warriors Way', '17321', '2021-12-12 08:00:05+00:00', '2021-12-12 07:58:03+00:00', '2021-12-12 07:58:03+00:00', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT', NULL, NULL, 'NaT', 'NaT', 'NaT');