TASK #157 · Medium · ZalandoAverage Items Per Order
Your brief
The orders table holds Zalando's orders; order_items
stores the line items of each order (order_id, product_id, quantity).
Write a query that returns a single number — the platform-wide average number of items (sum of quantity) per order. Round the answer to two decimals and name the column avg_items_per_order.
Write a query that returns a single number — the platform-wide average number of items (sum of quantity) per order. Round the answer to two decimals and name the column avg_items_per_order.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
productsproduct_id, product_name, category, pricereviewsreview_id, product_id, user_id, submit_date, starsinventoryinventory_id, product_id, status, add_dateordersorder_id, user_id, order_dateorder_itemsitem_id, order_id, product_id, quantity