Hello all,
I have a revisions table with the fields uniqueID, originalID, revNumber, data1, data2 and so on. What I am trying to do is select only the latest revisions for every unique originalID.
For example, if I have the records of uniqueID, originalID, revNumber as follows:
1, 1, 1
2, 1, 2
3, 1, 3
4, 1, 4
5, 2, 1
6, 2, 2
7, 3, 1
8, 3, 2
I want to be able to get uniqueIDs 4, 6, and 8 in the result set.
I've experiemented with a mixture of ORDER BY and GROUP BY clauses with no luck. Can anyone please help?