RienSQL
TASK #227 · Medium · Inditex

Sell-Through by Category

Your brief
The deliveries table records stock delivered to stores and sales records sales; in both tables quantity is the number of units. The sell-through of a category is sold × 100 / received.

Write a query that, across all stores and all dates, returns for every category that received stock category, the total units received units_received, the total units sold units_sold and sell_through_pct rounded to two decimals.
Expected columnscategory units_received units_sold sell_through_pctInditex
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
storesstore_id, store_name, city, region, monthly_target
productsproduct_id, product_name, category, price
salessale_id, store_id, product_id, sale_date, quantity, unit_price
deliveriesdelivery_id, store_id, product_id, delivery_date, quantity