SELECT COUNT (*) from ( select salary, min(salary) over () min_salary from tab1 ) salaries WHERE salary> min_salary /
Select allOpen in new window
As I a posted in your MAX question: If you think you need to query the table twice, rethink it.
This should return the same results and only access the table once:
Open in new window
Without the data you have, I cannot say if it will return 6 or 15 rows.