Waiting time by hour of day

MediumUberepochextract houraggregation· 20 XP

Uber's marketplace team suspects riders wait longer at certain hours. They want the average wait for each hour of the day.

For trips that a driver accepted, show each hour of the day (0 to 23, from request_ts), the number of trips and the average seconds from request to acceptance.

Expected output

  • avg_wait_seconds rounded to a whole number; sorted by hour

Example of the shape (made-up values):

hour trips avg_wait_seconds
0 20 251

Hints, the later steps and the answer come with Pro.

Write your query here. Ctrl + Enter submits.