--find the 3rd and nth salary select * from( select name, salary, dense_rank() over(order by salary desc)r from tblemployee) as salarySort where r in (2,3); -- find the salary based on the r value, sort by dense rank
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter