Vivek Sheth
Find 5th Highest salary in LinQ , SQL server, write code in C# 2.0. Is there any inbuilt function in C# which can give us direct output as Highest 5th Salary.?
By Vivek Sheth in Databases & DBA on Dec 15 2015
  • RajaGopal Gce
    Mar, 2017 6

    Select*from (Select EmpId,EmpName,salary,row_number() over(order by salary desc) rowno from Tbl_SalaryProcess)Q1 where Q1.rowno=5

    • 0
  • Parmsh M
    Jan, 2017 25

    select top 1 sal from (select top 5 sal from emp order by sal desc) e order by sal asc

    • 0
  • Vimal Lohani
    Jan, 2017 15

    Check this link : http://www.c-sharpcorner.com/blogs/experiment-with-nth-highest-or-lowest-salary-or-record-in-sql

    • 0
  • Hitendra kumbhar
    Dec, 2016 17

    SELECT TOP(1) EMPNAME,MAX(SALARY) SALARY FROM tblname GROUP BY EMPNAME ORDER BY salary DESC

    • 0
  • Jiseo Lee
    Oct, 2016 18

    ??? runman7942.com ?? ???? ???? ?? ????

    • 0
  • Dnyaneshwar Suryawanshi
    Jun, 2016 22

    select top(1) Salary from ( select distinct top(5) Salary from tblEmployee order by Salary DESC )as Temp order by Salary ASC

    • 0
  • Khajahaneef Shaik
    Jun, 2016 5

    with Cte as ( Select name,address,Dense_rank()over(partition by salary order by salary )r as rank from emp ) select top 1 * from Cte from where rank=5

    • 0
  • Mayur  Gujrathi
    Feb, 2016 23

    DataContext context = new DataContext(); var q= context.tblEmployee.GroupBy(ord => ord.Salary) .OrderByDescending(f => f.Key) .Skip(4) .First() .Select(ord=>ord.Salary) .Distinct();

    • 0