TASK #228 · Hard · InditexProducts 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.
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.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
storesstore_id, store_name, city, region, monthly_targetproductsproduct_id, product_name, category, pricesalessale_id, store_id, product_id, sale_date, quantity, unit_pricedeliveriesdelivery_id, store_id, product_id, delivery_date, quantity