I need to execute a query something like below.

```
SELECT TO_CHAR(ROWNUM),
A.Name,
B.Order,
(SELECT * FROM (
SELECT ROUND(LAST_ORDER_AMOUNT,5) FROM ORDERS WHERE ID=A.id AND REQUEST_LEVEL='N' ORDER BY O_DATE DESC)
WHERE ROWNUM =1) AS AMOUNT
FROM Table1 A LEFT JOIN Table2 B
ON A.TYPE_CODE = B.ENTITY_TYPE

```

But this gives me A.ID is invalid error in oracle. I need to get the first record from inner query as it will return multiple records.

Can someone please let me know how can i bind these tables to achieve my goal.

Thank you in advance.