SELECT * FROM ( SELECT * FROM TABLE t WHERE 1 HAVING 1 ORDER BY t.create_time DESC ) a GROUP BY user_id ORDER BY create_time DESC;