SELECT *
FROM PITEMREVISION PRev
iNNER JOiN
    (Select 
       PITEMREVISION.RITEMS_TAGU || '_' || PITEMREVISION.RSEQUENCE_ANCHORU Id,
       MAX(PITEMREVISION.PSEQUENCE_ID) MaxSeq
     From
       PITEMREVISION
     group by 
       PITEMREVISION.RITEMS_TAGU || '_' || PITEMREVISION.RSEQUENCE_ANCHORU
    )  HSeq
  ON (PRev.RITEMS_TAGU || '_' || PRev.RSEQUENCE_ANCHORU = HSeq.Id)
  and (PRev.PSEQUENCE_ID = HSeq.MaxSeq)
-- WHERE   PRev.PITEM_REVISION_ID like 'Rev%';

