I have a table:
id | value
1 | -
1 | a
2 | b
1 | c
3 | d
2 | e
then I need a counter column which begins from 1 for every different value in the id column
Desired select result:
id | value | counter
1 | - | 1
1 | a | 2
2 | b | 1
1 | c | 3
3 | d | 1
2 | e | 2
All I found was for counting the number of duplicates etc., but not for an incrementing counter on each duplicate of a specific column...?