// sid相同,create_time不同,取create_time最后一条
1. 使用 NOT EXISTS参数
SELECT id, sid FROM table_name a WHERE NOT EXISTS (SELECT 1 FROM table_name where a.sid = sid AND a.create_time < create_time)
2. 使用子查询
SELECT id, sid FROM table_name WHERE create_time IN (SELECT max(create_time) FROM table_name group by sid)