My hierarchical query looks like this:
select ID, PARENT_ID, START_TIME
FROM PROCESS
START WITH ID='X'
CONNECT BY ID=PRIOR PARENT_ID
My problem is that there are rows with the same ID 'X' and I only want the most recent one returned (when a process is duplicated, its ID is the same - can't change that). Additionally, I only want it to connect by prior parent ID for the row that is most recent as well.
From the docs, it appears that I can't do a query in the connect by to get just the latest prior parent_id - will I need to filter in code or is there a way to do this within the query?