How to get record where ROWNUM value is MAX
Hi,
I am running below query and getting 2 rows. I want only one row where value of ROWNUM is maximum (i.e. 2 in this case). ROWNUM could be 3,4,5.... depend how much record retrived by below query but always I want that record where ROWNUM is maximum.
SQL> select sak_claim_adj daughter_claim, rownum
2 from t_adj_ub92_xref@link_to_prod
3 start with sak_claim = 177412524
4 connect by prior sak_claim_adj = sak_claim;
DAUGHTER_CLAIM ROWNUM
-------------- ----------
179610821 1
179611385 2
So Expected result should be
DAUGHTER_CLAIM ROWNUM
-------------- ----------
179611385 2
Thanks,
Rohit