I have a table in Access like this:
ID | Op_ID
1 | 1
1 | 2
2 | 3
3 | 4
3 | 5
3 | 6
Is there a SELECT query that I can run in Access that would give me something like this?:
ID | Count(ID)
1 | 1
1 | 2
2 | 1
3 | 1
3 | 2
3 | 3
So basically I want a Count of ID that loops over ID every time ID changes.
Best Answer
This query simulates a RANK() function.
It works only if there is an unique ID field that allow to count records where: