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: 
I think the problem lies in the use of `top` which is SQL Server and not Oracle.

Use `rank` instead to get the salary in the decent order and get the first 10 of them:

```
select v.first_name, v.salary 
from ( select first_name, salary, rank() over (order by salary desc) r from employees) v
where v.r <= 10

```
The below Query works in Oracle.

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