RienSQL
TASK #225 · Easy · Inditex

Q1 Sales by Category

Your brief
Each row of sales is a sale in a Zara store: quantity units of a product at the actual unit price unit_price (discount already applied). The product category is in products.category.

Write a query that, for sales in the first quarter of 2025 (January 1 to March 31 inclusive), returns for every category category, the units sold units_sold and the revenue revenue (sum of quantity × unit_price). Sort by revenue in descending order.
Expected columnscategory units_sold revenueInditex
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