← 返回 waymo 的题目列表Retention Rating Analysis
类型:online_judge
Problem: Retention Rating Analysis
Given:
users(user_id, city)
rides(ride_id, ride_date, ride_rating, user_id)
For each user with rides, order the distinct calendar months in which the user had at least one ride. These are the user's 1st, 2nd, 3rd, ... active months; inactive calendar months are skipped.
For each city, compute:
the average rating across all rides in users' first active months;
the average rating across all rides in users' third active months.
Do not compute an average of per-user averages.
Return city, first_active_month_avg_rating, and third_active_month_avg_rating.