我目前有这个查询,它按降序选择最高的“拾取数量”。我只需要过滤前 10 行/最高的数字。我怎样才能做到这一点?
我尝试在底部添加“WHERE ROWNUM <= 10”,但无济于事。
SELECT customer.company_name, COUNT (item.pickup_reference) as "Number of Pickups"
FROM customer
JOIN item ON (customer.reference_no=item.pickup_reference)
GROUP BY customer.company_name, item.pickup_reference
ORDER BY COUNT (customer.company_name) DESC;
谢谢你的帮助!