Number rows from a value in one column

  • Hi!

    I want to number rows from a value in one column (apar_id).

    Table

    Apar_id    Amount

    10         200

    10         100

    11         100

    12         300

    12         200

    12         500

    Want this result from my query

    Number Apar_id    Amount

    1              10               200

    1              10              100

    2             11               100

    3             12              300

    3             12             200

    3             12            500

    Grateful for help!

  • It looks like  DENSE_RANK function will work for you.

    Adi

  • Thanks! 🙂

  • This was removed by the editor as SPAM

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply