SELECT *FROM ( SELECT id, user_id, report_store_user_id, create_time FROM tb_store_user_report ORDER BY id DESC ) AS iGROUP BY user_id结果:两个数据库数据是一样的
分组查询,查最新的那一条数据,排序条件create_time