Mock interview. You're interviewing for a senior analyst job on a ride-hailing loyalty team. The interviewer says: "We're thinking about a rewards program. Before we design it, I want to understand how concentrated our business is."
Use completed trips only. A rider's revenue is the sum of their fare. The data covers January to March 2026.
"Group riders by how many completed trips they took: 1, 2-3, 4-5 and 6+. For each group, show the riders, their share of all riders and their share of all revenue."
Expected output
trips_group, riders, pct_of_riders, pct_of_revenue (percentages rounded to 1 decimal); sorted by trips_groupExample of the shape (made-up values):
| trips_group | riders | pct_of_riders | pct_of_revenue |
|---|---|---|---|
| 1 | 30 | 8.0 | 2.0 |
Hints, the later steps and the answer come with Pro.
Step 1 of 4
Write your query here. Ctrl + Enter submits.