Possible Duplicate:
Oracle SQL - How to Retrieve highest 5 values of a column
Hey so I have a query to do this: Write a query which retrieves only the ten companies with the highest number of pickups over the six-month period The 6 months I have been given and I tried many queries this is what I have but I know its wrong as I have no idea
SELECT * FROM
(SELECT customers.name,COUNT(MANIFEST.MANIFEST_BARCODE) AS Pickups
FROM customers JOIN manifest ON (Reference = pickup_reference)
ORDER BY Pickups desc;)
WHERE ROWNUM < 11