Hello, I've been tasked with a SQL problem that is outside of the limited scope of sql knowledge that I have. I have the following problem.
I have a table that currently looks like this:
widgets
---------
a
a
a
b
b
c
d
d
d
I would like to have another table that has each unique value incrementally numbered... Like so:
widgets | widget_id
--------- ----------
a | 1
a | 1
a | 1
b | 2
b | 2
c | 3
d | 4
d | 4
d | 4
I'm not sure how this would be done with an insert statement?