ID NOT NULL NUMBER(38)
ACCOUNTNUMBER NOT NULL NUMBER(38)
ORIGINATINGACCOUNT NOT NULL NUMBER(38)
STARTTIME NOT NULL DATE
ENDTIME NOT NULL DATE
USAGETYPE NOT NULL NUMBER(10)
TRANSACTIONID NOT NULL NUMBER(38)
DESCRIPTION VARCHAR2(256)
CURRENCYCODE VARCHAR2(3)
AMOUNT NUMBER(28,10)

PK is ID
Transaction ID is not unique and is generated randomly..

I want to know the latest generated transactionid and the max(id) for that transaction..
How would I write the sql..

For ex..
ID Transactionid
1 55
2 55
3 99
4 99
5 62
6 62

If latest generated transaction id is 62 and then 99, I want the id that is max for these transactionid (6 and 4)..
I hope I am clear..

Thanks..