Ok try jee's original script on the same sample data in your third post.
ie.
SELECT ref_num, tran_date, tran_number
from table1 t1, (
SELECT MAX (to_char (TRAN_DATE, 'dd Mon YYYY HH24:MI:SS')) max_date, ref_num
FROM table1
GROUP BY ref_num) t2
WHERE t1.tran_date =...