Search ⌘K
Uber
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...

Foundations Track
Easy
15 min
query basics

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

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 INT
transaction_date DATE
spend NUMERIC(10
2
product_idtransaction_datespend2
1012022-03-141000.00
1012023-05-181300.00
1012024-02-021560.00
2022022-07-09900.00
2022023-08-10810.00
2022024-01-21972.00
Editor
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.