Question: I wrote this sql query: 

```
select first_name, salary 
from employees 
where salary in( select distinct top(10) salary from employees order by salary  disc );

```

When I ran it, I got this error:

SQL Error: ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"

What could have caused the error?

Answer: 
Top-N query is typically performed this way in Oracle: 

```
select * from (
select first_name, salary 
from employees order by salary desc
) where rownum <= 10

```

This one gets you top 10 salaries.
The below Query works in Oracle.

select \* from (select \* from emp order by sal desc) where rownum<=10;