-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.new_york.311_service_requests`
(
  unique_key INT64 OPTIONS(description=""),
  created_date TIMESTAMP OPTIONS(description=""),
  closed_date TIMESTAMP OPTIONS(description=""),
  agency STRING OPTIONS(description=""),
  agency_name STRING OPTIONS(description=""),
  complaint_type STRING OPTIONS(description=""),
  descriptor STRING OPTIONS(description=""),
  location_type STRING OPTIONS(description=""),
  incident_zip STRING OPTIONS(description=""),
  incident_address STRING OPTIONS(description=""),
  street_name STRING OPTIONS(description=""),
  cross_street_1 STRING OPTIONS(description=""),
  cross_street_2 STRING OPTIONS(description=""),
  intersection_street_1 STRING OPTIONS(description=""),
  intersection_street_2 STRING OPTIONS(description=""),
  address_type STRING OPTIONS(description=""),
  city STRING OPTIONS(description=""),
  landmark STRING OPTIONS(description=""),
  facility_type STRING OPTIONS(description=""),
  status STRING OPTIONS(description=""),
  due_date TIMESTAMP OPTIONS(description=""),
  resolution_description STRING OPTIONS(description=""),
  resolution_action_updated_date TIMESTAMP OPTIONS(description=""),
  community_board STRING OPTIONS(description=""),
  borough STRING OPTIONS(description=""),
  x_coordinate INT64 OPTIONS(description=""),
  y_coordinate INT64 OPTIONS(description=""),
  park_facility_name STRING OPTIONS(description=""),
  park_borough STRING OPTIONS(description=""),
  bbl INT64 OPTIONS(description=""),
  open_data_channel_type STRING OPTIONS(description=""),
  vehicle_type STRING OPTIONS(description=""),
  taxi_company_borough STRING OPTIONS(description=""),
  taxi_pickup_location STRING OPTIONS(description=""),
  bridge_highway_name STRING OPTIONS(description=""),
  bridge_highway_direction STRING OPTIONS(description=""),
  road_ramp STRING OPTIONS(description=""),
  bridge_highway_segment STRING OPTIONS(description=""),
  latitude FLOAT64 OPTIONS(description=""),
  longitude FLOAT64 OPTIONS(description=""),
  location STRING OPTIONS(description="")
)
OPTIONS(
  description="NYC 311 service requests logs"
);

INSERT INTO `bigquery-public-data.new_york.311_service_requests` (unique_key, created_date, closed_date, agency, agency_name, complaint_type, descriptor, location_type, incident_zip, incident_address, street_name, cross_street_1, cross_street_2, intersection_street_1, intersection_street_2, address_type, city, landmark, facility_type, status, due_date, resolution_description, resolution_action_updated_date, community_board, borough, x_coordinate, y_coordinate, park_facility_name, park_borough, bbl, open_data_channel_type, vehicle_type, taxi_company_borough, taxi_pickup_location, bridge_highway_name, bridge_highway_direction, road_ramp, bridge_highway_segment, latitude, longitude, location) VALUES (52528578, '2021-11-15 03:44:35+00:00', '2021-11-22 19:32:48+00:00', 'DHS', 'Department of Homeless Services', 'Homeless Person Assistance', NULL, 'Subway', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'ADDRESS', NULL, NULL, NULL, 'Closed', 'NaT', 'The Department of Homeless Services has sent a mobile outreach response team to the location.', '2021-11-15 04:44:17+00:00', 'Unspecified MANHATTAN', 'MANHATTAN', 984878, 208075, 'Unspecified', 'MANHATTAN', NULL, 'MOBILE', NULL, NULL, NULL, 'F', 'F M Uptown & Queens', NULL, 'Platform', 40.73779442489342, -73.99773386344371, '(40.73779442489342, -73.99773386344371)'), (44228236, '2019-11-04 14:20:06+00:00', '2019-11-04 18:15:43+00:00', 'NYPD', 'New York City Police Department', 'Homeless Encampment', NULL, 'Street/Sidewalk', '10011', 'WEST   15 STREET', 'WEST   15 STREET', '5 AVENUE', '6 AVENUE', '5 AVENUE', '6 AVENUE', NULL, NULL, NULL, NULL, 'Closed', 'NaT', 'The Police Department responded to the complaint and with the information available observed no evidence of the violation at that time.', '2019-11-04 18:15:55+00:00', 'Unspecified MANHATTAN', 'MANHATTAN', NULL, NULL, 'Unspecified', 'MANHATTAN', NULL, 'PHONE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, nan, NULL), (53578035, '2022-03-06 15:02:29+00:00', '2022-03-06 15:15:53+00:00', 'NYPD', 'New York City Police Department', 'Encampment', NULL, 'Subway', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Closed', 'NaT', 'The Police Department visited the location and no Encampment was found.', '2022-03-06 15:15:57+00:00', 'Unspecified MANHATTAN', 'MANHATTAN', 986905, 207081, 'Unspecified', 'MANHATTAN', NULL, 'MOBILE', NULL, NULL, NULL, '4', '4 5 6 Uptown & The Bronx', NULL, 'Platform', 40.7350657642674, -73.99041983091914, '(40.7350657642674, -73.99041983091914)'), (52161622, '2021-10-12 09:33:23+00:00', '2021-10-18 11:49:08+00:00', 'DHS', 'Department of Homeless Services', 'Encampment', NULL, 'Bridge', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Closed', 'NaT', 'The Department of Homeless Services (DHS) visited the location and is coordinating with their agency partners to address the condition. No further information will be available with 311.', '2021-10-18 11:49:12+00:00', 'Unspecified MANHATTAN', 'MANHATTAN', NULL, NULL, 'Unspecified', 'MANHATTAN', NULL, 'ONLINE', NULL, NULL, NULL, 'Manhattan Br', 'Manhattan Bound', 'Roadway', 'Roadway', nan, nan, NULL), (51523512, '2021-08-14 04:26:34+00:00', '2021-08-14 10:16:25+00:00', 'NYPD', 'New York City Police Department', 'Encampment', NULL, 'Subway', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Closed', 'NaT', 'The Police Department visited the location and no Encampment was found.', '2021-08-14 10:16:29+00:00', 'Unspecified QUEENS', 'QUEENS', 1016943, 209794, 'Unspecified', 'QUEENS', NULL, 'MOBILE', NULL, NULL, NULL, 'R', 'M R to Forest Hills', NULL, 'Platform', 40.742452245537685, -73.88201910140538, '(40.742452245537685, -73.88201910140538)');