Sunday, 21 April 2013

Highest Salary of any, in sql query


select distinct sal from salary s1 where n = (select count(distinct sal) from salary s2 where s1.sal <= s2.sal)
--n is the no. of integer of any highest salary.

No comments:

Post a Comment