Skip to content

Instantly share code, notes, and snippets.

@mderoy
Last active August 1, 2022 13:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
select
(
select
sum("passenger_count")
from
YELLOW_TAXI_JANUARY_2022_LOADED
where
"tpep_pickup_datetime"::time > '1:00am'
and "tpep_pickup_datetime"::time < '6:00am') as "overnight passengers 2022",
(
select
sum("passenger_count")
from
YELLOW_TAXI_JANUARY_2021
where
"tpep_pickup_datetime"::time > '1:00am'
and "tpep_pickup_datetime"::time < '6:00am') as "overnight passengers 2021";
overnight passengers 2022 | overnight passengers 2021
-------------------------+-------------------------
163058 | 33469
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment