复制代码 代码如下:
select * from (select * from member_payment
order by id desc) t group by member_id limit 10
复制代码 代码如下:
select s.*
from (SELECT max(id) as id FROM `member_payment` group by `member_id` limit 10) t
left join `member_payment` as s on t.id=s.id
复制代码 代码如下:
select * from `member_payment` where EXISTS (
select `id` from (
SELECT max(`id`) as id FROM `member_payment` group by `member_id` limit 10) t
where t.`id`=`member_payment`.`id`
)
新闻热点
疑难解答