LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Dense Rank Function

    Employee
    Posted 01-30-2015 20:30

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    I was asked about calculating a dense rank. For explanations, see some examples here:
    http://stackoverflow.com/questions/1...ions-in-oracle

    In short, if you want to calculate the 'rank' column as shown below:
    EMP# DEPT# SALARY rank
    7934 10 1300 1
    7782 10 2450 2
    7839 10 5000 3
    7369 20 800 1
    7876 20 1100 2
    7566 20 2975 3
    7788 20 3000 4
    7902 20 3000 4
    7900 30 950 1
    7654 30 1250 2
    7521 30 1250 2
    7844 30 1500 3
    7499 30 1600 4
    7698 30 2850 5

    Attachments:
    Dense_Rank.brg