select * from table1 a
where id2 =(select max(id2) from table1 where id1=a.id1 and column=(select max(column) from table1 where id1=a.id1) )
where id2 =(select max(id2) from table1 where id1=a.id1 and column=(select max(column) from table1 where id1=a.id1) )
402 0001 123
402 0002 154
403 0003 154
403 0004 365
201 0005 214
201 0006 214
201 0007 200结果如下:id1 id2 column
402 0002 154
403 0004 365
201 0006 214
呵呵,吹牛! :)
^O^
402 0001 123
402 0002 154
403 0003 154
403 0004 365
201 0005 214
201 0006 214
201 0007 200结果如下:id1 id2 column
402 0002 154
403 0004 365
201 0006 214
呵呵,吹牛! :)
^O^