SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Second Ride Delay

Unsolved

Uber calls a rider 'in-the-moment' when their first ride happened on the same date they signed up. For those riders, the team wants to know how many days pass between signing up and taking a second ride. A rider's rides are ordered by ride_date, then ride_id, so two rides on the same date are first and second in ride_id order. In-the-moment riders who never took a second ride are left out. Write an SQL query that returns a single column, avg_days_to_second_ride: the average number of days between signup_date and the second ride's ride_date, rounded to 2 decimal places.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Uber

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM users
Full source dataset
6 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine