RienSQL
TASK #226 · Medium · Inditex

Stores Below Target

Your brief
Every store in stores has a monthly sales target monthly_target in euros. The revenue of a sale in sales is quantity × unit_price.

Write a query that returns the stores whose March 2025 revenue was below their target: store_name, city, the March revenue revenue rounded to two decimals, and monthly_target. Include stores with no sales in March, with revenue equal to 0.
Expected columnsstore_name city revenue monthly_targetInditex
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