时间:2021-07-01 10:21:17 帮助过:37人阅读
select present_price,userid from wx_goods a where 2 > (select count(*) from wx_goods where userid=a.userid and present_price>a.present_price) GROUP BY present_price ORDER BY userid,present_price desc
其中 GROUP BY present_price 是为了去除因比较值重复的情况发生