Supermarket Q3

A supermarket has a SQL database which stores information about products and the stock they hold, and in which location.

The schema for the supermarket’s database is shown below.

Schema

Product(ProductID, Name, PricePence)

Stock(StockID, Location)

ProductStock(ProductID, StockID, Quantity)

Question

Write a query to select Product.ProductID, Product.Name that have no stock in any location. This is either where the quantity is 0 for all the locations, or where the the ProductID is missing from all the records of ProductStock. The result should be returned as a single table.

The returned table should have ascending ProductID.

You must not modify the database.