mysql先排序后去重的写法: SELECT * FROM ( SELECT DISTINCT * FROM A ORDER BY `created` DESC ) A GROUP BY user_id order by created cesc