Here is the Oracle Query to find the Top 5 Products sales amounts from the table
Synopsis:
SELECT * FROM
(
SELECT PROD_ID, SUM(AMOUNT_SOLD) AS "AMOUNT SOLD"
FROM SALES
GROUP BY PROD_ID
ORDER BY SUM(AMOUNT_SOLD) DESC
, PROD_ID ASC
) A
WHERE rownum <= 10;
Cheers!!!
Bose
No comments:
Post a Comment