select id,ROW_NUMBER() over(partition by name order by create_time desc) as row_sort from table
来源:https://blog.csdn.net/liuchang19950703/article/details/81003295