根据某一个字段重复只取第一条数据

select s.*  
from (
    select *, row_number() over (partition by [手机号] order by [店铺]) as group_idx  
    from table_name
) s
where s.group_idx = 1
原文地址:https://www.cnblogs.com/lanke0/p/7609732.html