I have a task regarding creating sequence numbers on existing records. This table already created and have a ton of records and I created a new field as "UniqueId".
Let's see my table below:-
FieldA FieldB UniqueId
Zack 928334
Yassir 829384
Yassir 829384
Zack 928334
Zack 928334
Richard 723346
What I need is PostgreSQL or Python can create a number started like "0501" on the first record if the same record found a new number but a sequence will be "0502" and so on.
FieldA FieldB UniqueId
Zack 928334 0501
Yassir 829384 0501
Yassir 829384 0502
Zack 928334 0502
Zack 928334 0503
Richard 723346 0501
I still don't have any idea regarding this matter and hope those who are already across this problem can help me to solve it.
I promptly thanks you very much in advance.
Thank you.