以下是我的解决方法,不知道与楼主方法是否一致,不一致的话,希望楼主多多分享 SQL> select * from test1 t;CLUM1 CLUM2 CLUM3 -------------------- -------------------- -------------------- a 1 7 a 2 6 b 3 5 b 4 4 c 5 3 c 6 2 c 7 17 rows selectedSQL> select * from test1 t where clum2 in (select Max(clum2) from test1 group by clum1);CLUM1 CLUM2 CLUM3 -------------------- -------------------- -------------------- a 2 6 b 4 4 c 7 1SQL>
SQL> select * from test1 t;CLUM1 CLUM2 CLUM3
-------------------- -------------------- --------------------
a 1 7
a 2 6
b 3 5
b 4 4
c 5 3
c 6 2
c 7 17 rows selectedSQL> select * from test1 t where clum2 in (select Max(clum2) from test1 group by clum1);CLUM1 CLUM2 CLUM3
-------------------- -------------------- --------------------
a 2 6
b 4 4
c 7 1SQL>
太多 了分析函数;not exists +rowid