Two approaches come to my mind. First is to order by salaray and take the next row. Limit the number of rows output, database permitting. Second using subquery, which definately is not the most efficient way, but allows this to be done with a single query.
Ayub ali khan
Joined: Oct 20, 2005
Thanks Jussi!! Could you metion the query for the first approach?