Skip to main content

E-commerce: Units Ordered Last Week

EasyPremium

Amazon is a large e-commerce platform where customers can order various items ranging from electronics to clothing.

You're provided with two tables, orders and items, with the following columns:

order_idcustomer_idorder_dateitem_idorder_quantity
integerintegerdateintegerinteger
item_iditem_category
integerstring

Write an SQL query that determines how many units were ordered from Amazon's e-commerce platform in the last week. Your output should have the following columns: item_category, total_units_ordered_last_7_days

This question is part of a 5-part e-commerce question series. The other lessons in the series are linked below: