I currently have a table in MySQL (below) where I need to re-number the Lane field to start from 1, and increment only on a change of the original Lane value.
As an example, a desired table outcome is also listed below.
There isn't a calculated link between the new Lane number and the old Lane number.
Original Table
Class
ClassID|Lane
1 |8
2 |8
3 |11
4 |11
5 |11
6 |12
7 |18
8 |18
9 |18
10 |21
11 |22
12 |22
13 |22
Desired Result
Class
ClassID|Lane
1 |1
2 |1
3 |2
4 |2
5 |2
6 |3
7 |4
8 |4
9 |4
10 |5
11 |6
12 |6
13 |6
The original table is nearly 7000 rows, so do it manually is not viable. (I did start, but figured out it was more difficult than I expected.)
Any help would be greatly appreciated.