Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

Top Categories · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

How to find out 5th highest salary with out using System functions

Jan 25 2012 12:00AM by Sri   

How to find out 5th highest salary with out using System functions like aggregation functions and order by clause

Submitted under: Microsoft SQL Server · TSQL ·  ·  · 


Sri
114 · 1% · 449

1 Replies

  • Try this query

    --Nth Highest Salary Query
    DECLARE @SalaryPosition int
    SET @SalaryPosition = 5
    SELECT *
    FROM Employee E1
    WHERE  @SalaryPosition =  
              (
                SELECT COUNT(DISTINCT E2.Salary) 
                FROM Employee E2
                WHERE E2.Salary >= E1.Salary
              )
    
    commented on Jan 25 2012 12:09PM
    Mitesh Modi
    18 · 10% · 3078

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]