query needed

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

Hi, I have three tables and i need query lowest price for the product 'AA40' in all cities Product-- ProductID,Name Supplier-- SupplierID,Name,City Poduct_Supplier--ProductID,SupplierID,Price

Generate a report which outputs the lowest price for the product 'AA40' in all cities thanks jack

-- Anonymous, July 17, 2001



This works:

select City, min (Price) as Price from Product, Supplier, Product_Supplier where Product.ProductID = 'AA40' and Product.ProductID = Product_Supplier.ProductID and Supplier.SupplierID = Product_Supplier.SupplierID group by City

Hope this helps,


-- Anonymous, July 17, 2001

Moderation questions? read the FAQ