Back to problems

Compute Ride Metrics in SQL

SQL · Waymo · Medium

A ride-hailing service keeps two relational tables. users contains one record for each registered account: user_id BIGINT PRIMARY KEY city VARCHAR NOT NULL rides contains one record for each completed trip: ride_id BIGINT PRIMARY KEY ride_date TIMESTAMP NOT NULL ride_rating DECIMAL, nullable user_id BIGINT NOT NULL, foreign key to users.user_id Assumptions: Every row in users belongs to an eligible user, including users who registered but never took a ride. All date…

Checking your access…