I've this query which runs successfuly
SELECT customerNumber
FROM ORDERS
GROUP BY customerNumber
ORDER BY count(orderNumber) DESC
But when I try to limit the number of rows returned to 1, I get the following error
ORA-00933: SQL command not properly ended
Here's what I've tried :
SELECT customerNumber
FROM ORDERS
GROUP BY customerNumber
ORDER BY count(orderNumber) DESC
fetch first 1 row only;
and
SELECT customerNumber
FROM ORDERS
GROUP BY customerNumber
ORDER BY count(orderNumber) DESC
WHERE ROWNUM=1;