Back to Playground Home

Find the locations that have the longest trips

select PULocationID, 
       sum(trip_distance) AS totalDistance,
       avg(trip_distance) AS avgDistance
from nyctaxis
GROUP BY PULocationID
ORDER BY totalDistance DESC