I have following sql query for finding 2nd max salary.
Select * From Employee E1 Where (2) = (Select Count(Distinct(E2.Salary)) From Employee E2 Where
This will work for duplicate record as well as nth highest salary just need to play with take and skip thats all for ex below is for 3 rd highest salary with duplicate record present in table-
emplist.OrderByDescending(x => x.Salary).Select(x=>x.Salary).Distinct().Take(3).Skip(2).First();