Amazon
Foundations Track · Easy · 15 min
04 Easy Amazon Purchasing Activity By Product Type
-- purchasing activity by product type -- SELECT t1.order_date, t1.product_type, ( SELECT SUM(quantity) FROM total_trans AS t2 WHERE t2.order_date <= t1.orde...
Company labels are directional practice context, not official interview guidance.
Objective
Practice aggregation through a Amazon-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.
-- purchasing activity by product type -- SELECT t1.order_date, t1.product_type, ( SELECT SUM(quantity) FROM total_trans AS t2 WHERE t2.order_date <= t1.order_date AND t2.product_type = t1.product_type ) AS cum_purchased FROM total_trans AS t1;
total_trans
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.