群里有人问。。开始以为 max() ,然后分组就可以。。结果试确实不行。。
正确方式如下:
select myid,price,other from test as t where price=(select max(t1.price) from test as t1 where t.myid = t1.myid )