I guess my question could be answered with an Oracle analytic function in the SQL but I am not to sure. Say I have the following "DOCUMENTS" DB Table: Rank: Reverse Sequence, each document has its own sequence, latest document revision has lowest (0) number Revision: Alpha numerical sequence per document, latest document revision has highest revision id NAME RANK REVISION STATEDocumentA 0 5b ReadOnlyDocumentA 1 5a DraftDocumentA 3 3 ReadOnlyDocumentA 4 2 DraftDocumentA 2 4 PublishedDocumentA 5 1 PublishedDocumentB 0 2 DraftDocumentB 1 1 PublishedDocumentC 0 1 Published Requested result set: Latest published revision for each document Give me, for each document, the latest published document, having the lowest rank number Since the latest document revision can be in state draft it is not always 0 NAME RANK REVISION STATEDocumentA 2 4 PublishedDocumentB 1 1 PublishedDocumentC 0 1 Published Please formulate the SQL query to return this result set. Many thanks! Continue reading...