Skip to content
Advertisement

Giving a specific number to fields in my Db

I want to give specific unique numbers to the following field in my db. The column looks like:

I want the output in the following format:

and so on. There can be n number of rows for each of the months name. The result should have unique and incremental identifier on a month basis. And on change of year, it should continue and not restart from 0.

Advertisement

Answer

You can use dense_rank()

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement