I have the following sql query, which runs fine on MYSQL but gives error with Oracle and SQL Server because of the last limit 1 clause. My question is just - Is this limit 1 clause valid as per PostgreSQL and can I expect this to run successfully on Postgres?
select customer_number
from
(select
customer_number,
count(*)
from
orders
group by
customer_number
order by count(*) desc limit 1) a
;