Ved at bruge aggregatfunktion og selvtilslutning kunne du gøre noget som
select a.*
from demo a
left join demo b on a.person_id = b.person_id
group by a.person_id,a.salary
having sum(a.salary < b.salary) = 1 /* 0 for highest 1 for second highest 2 for third and so on ... */
eller ved at bruge komplet kasusudtryk i sum
having sum(case when a.salary < b.salary then 1 else 0 end) = 1