Here ans should be 0
number |
salary |
1 |
100 |
2 |
200 |
3 |
300 |
4 |
400 |
5 |
500 |
6 |
600 |
7 |
700 |
8 |
800 |
9 |
900 |
10 |
1000 |
first inner query will execute and result will be {100,200,300,400,500,600,700,800,900.1000}
then outer query execute but in count number of employee whose salary greater than {100,200,300,400,500,600,700,800,900.1000}. this condition will be false because no salary greater than all these salary so ans will be 0.
where x> {100,200,300,400,500,600,700,800,900.1000} this is false
find number of employee whose salary greater than all given salary.( english version of above query)
ans 0