Quick Overview

Write a PostgreSQL query that reports, for each calendar month, the total number of rides and the average rating rounded to two decimals, newest month first. Tests month bucketing, counting unrated rides while averaging only rated ones, and ordering.

SQL: Monthly Ride Totals and Average Ratings, Newest Month First

Company: Waymo

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

Overview: Write a PostgreSQL query that reports, for each calendar month, the total number of rides and the average rating rounded to two decimals, newest month first. Tests month bucketing, counting unrated rides while averaging only rated ones, and ordering.

Loading…