I have a table which looks like this:

```
+-----------------+--------------+
| Field           | Type         |
+-----------------+--------------+
| orderNumber (PK)| int          |
| orderDate       | date         |
| requiredDate    | date         |
| shippedDate     | date         |
| status          | char(15)     |
| comments        | char(200)    |
| customerNumber  | int          |
+-----------------+--------------+

```

I need to return the customerNumber which has maximum number of orders.

I tried the following command:

```
SELECT customerNumber FROM ORDERS WHERE customerNumber IN (SELECT customerNumber FROM ORDERS HAVING MAX(COUNT(customerNumber)) GROUP BY customerNumber);

```

I think an error: group function is nested too deeply