$ curl -O https:\/\/clickhouse-datasets.s3.yandex.net\/trips_mergetree\/partitions\/trips_mergetree.tar\r\n$ tar xvf trips_mergetree.tar -C \/var\/lib\/clickhouse # path to ClickHouse data directory\r\n$ # check permissions of unpacked data, fix if required\r\n$ sudo service clickhouse-server restart\r\n$ clickhouse-client --query \"select count(*) from datasets.trips_mergetree\"<\/pre>\nThe entire download will be an uncompressed CSV data files of 227 GB in size, It takes approximately 50 minutes with 1Gbit of connection. The data must be pre-processed in PostgreSQL before loading to ClickHouse<\/p>\n
$ time psql nyc-taxi-data -c \"SELECT count(*) FROM trips;\"\r\n## Count\r\n1299989791\r\n(1 row)\r\n\r\nreal 4m1.274s\r\n\r\n<\/pre>\nApprox. 1.3 Billion records in PostgreSQL with database size of around 390 GB.<\/p>\n
Exporting data from PostgreSQL:<\/p>\n
COPY\r\n(\r\nSELECT trips.id,\r\ntrips.vendor_id,\r\ntrips.pickup_datetime,\r\ntrips.dropoff_datetime,\r\ntrips.store_and_fwd_flag,\r\ntrips.rate_code_id,\r\ntrips.pickup_longitude,\r\ntrips.pickup_latitude,\r\ntrips.dropoff_longitude,\r\ntrips.dropoff_latitude,\r\ntrips.passenger_count,\r\ntrips.trip_distance,\r\ntrips.fare_amount,\r\ntrips.extra,\r\ntrips.mta_tax,\r\ntrips.tip_amount,\r\ntrips.tolls_amount,\r\ntrips.ehail_fee,\r\ntrips.improvement_surcharge,\r\ntrips.total_amount,\r\ntrips.payment_type,\r\ntrips.trip_type,\r\ntrips.pickup,\r\ntrips.dropoff,\r\ncab_types.type cab_type,\r\nweather.precipitation_tenths_of_mm rain,\r\nweather.snow_depth_mm,\r\nweather.snowfall_mm,\r\nweather.max_temperature_tenths_degrees_celsius max_temp,\r\nweather.min_temperature_tenths_degrees_celsius min_temp,\r\nweather.average_wind_speed_tenths_of_meters_per_second wind,\r\npick_up.gid pickup_nyct2010_gid,\r\npick_up.ctlabel pickup_ctlabel,\r\npick_up.borocode pickup_borocode,\r\npick_up.boroname pickup_boroname,\r\npick_up.ct2010 pickup_ct2010,\r\npick_up.boroct2010 pickup_boroct2010,\r\npick_up.cdeligibil pickup_cdeligibil,\r\npick_up.ntacode pickup_ntacode,\r\npick_up.ntaname pickup_ntaname,\r\npick_up.puma pickup_puma,\r\ndrop_off.gid dropoff_nyct2010_gid,\r\ndrop_off.ctlabel dropoff_ctlabel,\r\ndrop_off.borocode dropoff_borocode,\r\ndrop_off.boroname dropoff_boroname,\r\ndrop_off.ct2010 dropoff_ct2010,\r\ndrop_off.boroct2010 dropoff_boroct2010,\r\ndrop_off.cdeligibil dropoff_cdeligibil,\r\ndrop_off.ntacode dropoff_ntacode,\r\ndrop_off.ntaname dropoff_ntaname,\r\ndrop_off.puma dropoff_puma\r\nFROM trips\r\nLEFT JOIN cab_types\r\nON trips.cab_type_id = cab_types.id\r\nLEFT JOIN central_park_weather_observations_raw weather\r\nON weather.date = trips.pickup_datetime::date\r\nLEFT JOIN nyct2010 pick_up\r\nON pick_up.gid = trips.pickup_nyct2010_gid\r\nLEFT JOIN nyct2010 drop_off\r\nON drop_off.gid = trips.dropoff_nyct2010_gid\r\n) TO '\/opt\/milovidov\/nyc-taxi-data\/trips.tsv';<\/pre>\nThe entire activity will be completed in approx. 4 hours , the data snapshot speed was around 80MB per second and TSV file size is\u00a0590612904969 bytes.<\/p>\n
For data cleansing and removing NULLs we will create a temporary table in ClickHouse:<\/p>\n
CREATE TABLE trips\r\n(\r\ntrip_id UInt32,\r\nvendor_id String,\r\npickup_datetime DateTime,\r\ndropoff_datetime Nullable(DateTime),\r\nstore_and_fwd_flag Nullable(FixedString(1)),\r\nrate_code_id Nullable(UInt8),\r\npickup_longitude Nullable(Float64),\r\npickup_latitude Nullable(Float64),\r\ndropoff_longitude Nullable(Float64),\r\ndropoff_latitude Nullable(Float64),\r\npassenger_count Nullable(UInt8),\r\ntrip_distance Nullable(Float64),\r\nfare_amount Nullable(Float32),\r\nextra Nullable(Float32),\r\nmta_tax Nullable(Float32),\r\ntip_amount Nullable(Float32),\r\ntolls_amount Nullable(Float32),\r\nehail_fee Nullable(Float32),\r\nimprovement_surcharge Nullable(Float32),\r\ntotal_amount Nullable(Float32),\r\npayment_type Nullable(String),\r\ntrip_type Nullable(UInt8),\r\npickup Nullable(String),\r\ndropoff Nullable(String),\r\ncab_type Nullable(String),\r\nprecipitation Nullable(UInt8),\r\nsnow_depth Nullable(UInt8),\r\nsnowfall Nullable(UInt8),\r\nmax_temperature Nullable(UInt8),\r\nmin_temperature Nullable(UInt8),\r\naverage_wind_speed Nullable(UInt8),\r\npickup_nyct2010_gid Nullable(UInt8),\r\npickup_ctlabel Nullable(String),\r\npickup_borocode Nullable(UInt8),\r\npickup_boroname Nullable(String),\r\npickup_ct2010 Nullable(String),\r\npickup_boroct2010 Nullable(String),\r\npickup_cdeligibil Nullable(FixedString(1)),\r\npickup_ntacode Nullable(String),\r\npickup_ntaname Nullable(String),\r\npickup_puma Nullable(String),\r\ndropoff_nyct2010_gid Nullable(UInt8),\r\ndropoff_ctlabel Nullable(String),\r\ndropoff_borocode Nullable(UInt8),\r\ndropoff_boroname Nullable(String),\r\ndropoff_ct2010 Nullable(String),\r\ndropoff_boroct2010 Nullable(String),\r\ndropoff_cdeligibil Nullable(String),\r\ndropoff_ntacode Nullable(String),\r\ndropoff_ntaname Nullable(String),\r\ndropoff_puma Nullable(String)\r\n) ENGINE = Log;<\/pre>\n$ time clickhouse-client --query=\"INSERT INTO trips FORMAT TabSeparated\" < trips.tsv\r\n\r\nreal 61m38.597s<\/pre>\nI have done this benchmarking on a single ClickHouse server using MergeTree engine , Created Summary Table & loaded data below:<\/p>\n
CREATE TABLE trips_mergetree\r\nENGINE = MergeTree(pickup_date, pickup_datetime, 8192)\r\nAS SELECT\r\n\r\ntrip_id,\r\nCAST(vendor_id AS Enum8('1' = 1, '2' = 2, 'CMT' = 3, 'VTS' = 4, 'DDS' = 5, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14)) AS vendor_id,\r\ntoDate(pickup_datetime) AS pickup_date,\r\nifNull(pickup_datetime, toDateTime(0)) AS pickup_datetime,\r\ntoDate(dropoff_datetime) AS dropoff_date,\r\nifNull(dropoff_datetime, toDateTime(0)) AS dropoff_datetime,\r\nassumeNotNull(store_and_fwd_flag) IN ('Y', '1', '2') AS store_and_fwd_flag,\r\nassumeNotNull(rate_code_id) AS rate_code_id,\r\nassumeNotNull(pickup_longitude) AS pickup_longitude,\r\nassumeNotNull(pickup_latitude) AS pickup_latitude,\r\nassumeNotNull(dropoff_longitude) AS dropoff_longitude,\r\nassumeNotNull(dropoff_latitude) AS dropoff_latitude,\r\nassumeNotNull(passenger_count) AS passenger_count,\r\nassumeNotNull(trip_distance) AS trip_distance,\r\nassumeNotNull(fare_amount) AS fare_amount,\r\nassumeNotNull(extra) AS extra,\r\nassumeNotNull(mta_tax) AS mta_tax,\r\nassumeNotNull(tip_amount) AS tip_amount,\r\nassumeNotNull(tolls_amount) AS tolls_amount,\r\nassumeNotNull(ehail_fee) AS ehail_fee,\r\nassumeNotNull(improvement_surcharge) AS improvement_surcharge,\r\nassumeNotNull(total_amount) AS total_amount,\r\nCAST((assumeNotNull(payment_type) AS pt) IN ('CSH', 'CASH', 'Cash', 'CAS', 'Cas', '1') ? 'CSH' : (pt IN ('CRD', 'Credit', 'Cre', 'CRE', 'CREDIT', '2') ? 'CRE' : (pt IN ('NOC', 'No Charge', 'No', '3') ? 'NOC' : (pt IN ('DIS', 'Dispute', 'Dis', '4') ? 'DIS' : 'UNK'))) AS Enum8('CSH' = 1, 'CRE' = 2, 'UNK' = 0, 'NOC' = 3, 'DIS' = 4)) AS payment_type_,\r\nassumeNotNull(trip_type) AS trip_type,\r\nifNull(toFixedString(unhex(pickup), 25), toFixedString('', 25)) AS pickup,\r\nifNull(toFixedString(unhex(dropoff), 25), toFixedString('', 25)) AS dropoff,\r\nCAST(assumeNotNull(cab_type) AS Enum8('yellow' = 1, 'green' = 2, 'uber' = 3)) AS cab_type,\r\n\r\nassumeNotNull(pickup_nyct2010_gid) AS pickup_nyct2010_gid,\r\ntoFloat32(ifNull(pickup_ctlabel, '0')) AS pickup_ctlabel,\r\nassumeNotNull(pickup_borocode) AS pickup_borocode,\r\nCAST(assumeNotNull(pickup_boroname) AS Enum8('Manhattan' = 1, 'Queens' = 4, 'Brooklyn' = 3, '' = 0, 'Bronx' = 2, 'Staten Island' = 5)) AS pickup_boroname,\r\ntoFixedString(ifNull(pickup_ct2010, '000000'), 6) AS pickup_ct2010,\r\ntoFixedString(ifNull(pickup_boroct2010, '0000000'), 7) AS pickup_boroct2010,\r\nCAST(assumeNotNull(ifNull(pickup_cdeligibil, ' ')) AS Enum8(' ' = 0, 'E' = 1, 'I' = 2)) AS pickup_cdeligibil,\r\ntoFixedString(ifNull(pickup_ntacode, '0000'), 4) AS pickup_ntacode,\r\n\r\nCAST(assumeNotNull(pickup_ntaname) AS Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195)) AS pickup_ntaname,\r\n\r\ntoUInt16(ifNull(pickup_puma, '0')) AS pickup_puma,\r\n\r\nassumeNotNull(dropoff_nyct2010_gid) AS dropoff_nyct2010_gid,\r\ntoFloat32(ifNull(dropoff_ctlabel, '0')) AS dropoff_ctlabel,\r\nassumeNotNull(dropoff_borocode) AS dropoff_borocode,\r\nCAST(assumeNotNull(dropoff_boroname) AS Enum8('Manhattan' = 1, 'Queens' = 4, 'Brooklyn' = 3, '' = 0, 'Bronx' = 2, 'Staten Island' = 5)) AS dropoff_boroname,\r\ntoFixedString(ifNull(dropoff_ct2010, '000000'), 6) AS dropoff_ct2010,\r\ntoFixedString(ifNull(dropoff_boroct2010, '0000000'), 7) AS dropoff_boroct2010,\r\nCAST(assumeNotNull(ifNull(dropoff_cdeligibil, ' ')) AS Enum8(' ' = 0, 'E' = 1, 'I' = 2)) AS dropoff_cdeligibil,\r\ntoFixedString(ifNull(dropoff_ntacode, '0000'), 4) AS dropoff_ntacode,\r\n\r\nCAST(assumeNotNull(dropoff_ntaname) AS Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195)) AS dropoff_ntaname,\r\n\r\ntoUInt16(ifNull(dropoff_puma, '0')) AS dropoff_puma\r\n\r\nFROM trips<\/pre>\n