按照某字段長度排序去重

select * from (     SELECT *,row_number() over (partition by name) num FROM `users` ORDER BY LENGTH(shenfenzheng) desc ) a where a.num =1spa //再user表中對name去重,留下身份證號最長it
相關文章
相關標籤/搜索