-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.san_francisco_transit_muni.stop_monitoring`
(
  time_recorded TIMESTAMP OPTIONS(description="The timestamp of the real-time update from the particular vehicle."),
  stop_id STRING OPTIONS(description="Unique reference for the stop being monitored. Maps to stop_id in the stops table"),
  stop_name STRING OPTIONS(description="Full text name of the stop being monitored. Maps to stop_name in the stops table"),
  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."),
  vehicle_at_stop BOOL OPTIONS(description="Determines if the vehicle is at the monitored stop during the time_recorded. TRUE if vehicle is at the stop"),
  aimed_arrival_time TIMESTAMP OPTIONS(description="Vehicle's expected arrival time"),
  aimed_departure_time TIMESTAMP OPTIONS(description="Vehicle's expected departure time")
);

INSERT INTO `bigquery-public-data.san_francisco_transit_muni.stop_monitoring` (time_recorded, stop_id, stop_name, route_id, direction, trip_date, trip_id, route_long_name, vehicle_location_lat, vehicle_location_lon, vehicle_location, vehicle_id, vehicle_at_stop, aimed_arrival_time, aimed_departure_time) VALUES ('2021-09-15 14:28:08+00:00', '10390', '19th Avenue & Holloway St', '28', 'IB', '2021-09-15', '10276997', '19TH AVENUE', 37.716011, -122.472198, 'POINT(-122.472198 37.716011)', '8746', NULL, '2021-09-15 14:26:00+00:00', '2021-09-15 14:26:00+00:00'), ('2021-09-15 14:47:59+00:00', '10390', '19th Avenue & Holloway St', '28', 'IB', '2021-09-15', '10276999', '19TH AVENUE', 37.7156334, -122.471992, 'POINT(-122.471992 37.7156334)', '8753', NULL, '2021-09-15 14:50:00+00:00', '2021-09-15 14:50:00+00:00'), ('2021-09-15 15:00:55+00:00', '10390', '19th Avenue & Holloway St', '28', 'IB', '2021-09-15', '10277000', '19TH AVENUE', 37.7160988, -122.472221, 'POINT(-122.472221 37.7160988)', '8772', NULL, '2021-09-15 15:03:00+00:00', '2021-09-15 15:03:00+00:00'), ('2021-09-15 14:35:57+00:00', '10390', '19th Avenue & Holloway St', '28', 'IB', '2021-09-15', '10276998', '19TH AVENUE', 37.7137833, -122.471703, 'POINT(-122.471703 37.7137833)', '8778', NULL, '2021-09-15 14:38:00+00:00', '2021-09-15 14:38:00+00:00'), ('2021-09-15 19:20:00+00:00', '10390', '19th Avenue & Holloway St', '28', 'IB', '2021-09-15', '10277295', '19TH AVENUE', 37.7145004, -122.47155, 'POINT(-122.47155 37.7145004)', '8778', NULL, '2021-09-15 19:22:00+00:00', '2021-09-15 19:22:00+00:00');