1. distinct
select distinct 列名 from 表名
2. row_number
select *, row_number() over (partition by 想去重的列名 order by 列名) as row_num
from 表名
where row_num = 1
3.group by
select 列名 from 表名 group by 列名
重复量多时,GROUP BY总的处理效率比DISTINCT高,重复量低时,DISTINCT就比GROUP BY快一点了,而如果随着整体数据量的增加,效果会越来越明显。