SQL> select bt.id,bt.a,bt.b,bt.createdate from(select a,b,max(createdate) maxd f
rom testme group by a,b having a=b) at,testme bt where at.a=bt.a and at.b=bt.b a
nd at.maxd=bt.createdate;
ID A B CREATEDATE
---------- ---------- ---------- ----------
2 1 1 01-2月 -03
4 2 2 01-2月 -03