First of all this is not MySQl forum
This forum deals with MS SQL Server product.S o solutions given here are T-SQL centric which is MS SQL Server programming dialect. So your will always get best resulst by posting in mysql forums
That being said ANSI based query syntax should work fine in most systems
As per that I think you can try like below and see if it works
SELECT p.Product,MIN(pp.Price) AS LowestPrice,MAX(Price) AS SecondLowestPrice
FROM Product p
INNER JOIN ProductPrices pp
ON pp.ProductID = p.ID
WHERE 1 >= (
SELECT COUNT(*)
FROM ProductPrices
WHERE ProductID = pp.ProductID
AND Price < pp.Price
)GROUP BY p.Product
if not please try your luck in some MySQL forums
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page