E
Esperanza
Hello everyone,
I want to return the top 5 values by group in a query, example,
if I use the following code, I got only the 5 first records in the result.
Let say for each product, I have 12 different prices, I want in the result
only 5 prices per product.
Thanks a lot !!
Esperanza
SELECT Top 5 ProductName, ProductUnitPrice
FROM Products
GROUP BY ProductName, ProductUnitPrice
ORDER BY ProductUnitPrice Desc;
I want to return the top 5 values by group in a query, example,
if I use the following code, I got only the 5 first records in the result.
Let say for each product, I have 12 different prices, I want in the result
only 5 prices per product.
Thanks a lot !!
Esperanza
SELECT Top 5 ProductName, ProductUnitPrice
FROM Products
GROUP BY ProductName, ProductUnitPrice
ORDER BY ProductUnitPrice Desc;