I was trying to get all records with duplicate data and update it by putting a sequence number.
Let's say i have this data:
+-------------------------------------------+
| first_name | last_name | sequence_number |
+-------------------------------------------+
| John | Smith | NULL |
| John | Smith | NULL |
| Jane | Doe | NULL |
| Jane | Doe | NULL |
| Jane | Doe | NULL |
| Rock | Lee | NULL |
+-------------------------------------------+
and my expected output is like this:
+-------------------------------------------+
| first_name | last_name | sequence_number |
+-------------------------------------------+
| John | Smith | 1 |
| John | Smith | 2 |
| Jane | Doe | 1 |
| Jane | Doe | 2 |
| Jane | Doe | 3 |
| Rock | Lee | NULL |
+-------------------------------------------+