You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT
PULocationID, DOLocationID, window_start AS day,
pu_zones.Zone as PULocationName,
do_zones.Zone as DOLocationName,
AVG(fare_amount) as avg_amount
INTO avg_fares
FROM TUMBLE(trips, tpep_pickup_datetime, '1 DAY')
INNER JOIN zones pu_zones ON trips.PULocationID = pu_zones.LocationID
INNER JOIN zones do_zones ON trips.DOLocationID = do_zones.LocationID
GROUP BY day, PULocationID, DOLocationID;
While this one does work:
SELECT
PULocationID, DOLocationID, window_start AS day,
pu_zones.Zone as PULocationName,
do_zones.Zone as DOLocationName,
AVG(fare_amount) as avg_amount
INTO avg_fares
FROM TUMBLE(trips, tpep_pickup_datetime, '1 DAY')
INNER JOIN zones pu_zones ON trips.PULocationID = pu_zones.LocationID
INNER JOIN zones do_zones ON trips.DOLocationID = do_zones.LocationID
GROUP BY window_start, PULocationID, DOLocationID;
GROUP BY should support using aliases as well as original field names
The text was updated successfully, but these errors were encountered:
The following query does not work
While this one does work:
GROUP BY
should support using aliases as well as original field namesThe text was updated successfully, but these errors were encountered: