Uber
Foundations Track · Easy · 15 min
Year-on-year Product Spend Growth
Use this Uber trend check to work on year-on-year product spend growth. Calculate the year-on-year growth rate for each product_id. Return report_year, produ...
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a Uber-tagged business scenario.
Approach
Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.
Company context
Company labels are directional practice context, not official interview guidance.
Use this Uber trend check to work on year-on-year product spend growth. Calculate the year-on-year growth rate for each product_id. Return report_year, product_id, current_year_spend, prior_year_spend, and yoy_growth_pct sorted by report_year and product_id.
yearly_product_spend
| product_id | transaction_date | spend | 2 |
|---|---|---|---|
| 101 | 2022-03-14 | 1000.00 | |
| 101 | 2023-05-18 | 1300.00 | |
| 101 | 2024-02-02 | 1560.00 | |
| 202 | 2022-07-09 | 900.00 | |
| 202 | 2023-08-10 | 810.00 | |
| 202 | 2024-01-21 | 972.00 |
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.