RienSQL
TASK #228 · Hard · Inditex

Products Not Sold in a Region

Your brief
Stores in stores are grouped into regions region. The deliveries table shows which products were delivered to each store, and sales shows what was sold and where.

Write a query that finds the (region, product) pairs where the product was delivered to at least one store of the region but was not sold in any store of that region. Return region and product_name, each pair once.
Expected columnsregion product_nameInditex
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