MySQL的去重

1.distinct去重

去掉所有相同字段

2.group_concat函数

select id,group_concat(price separator ';') from goods group by id;  

3.聚合函数加count

在select中使用count(distinct 字段)

原文地址:https://www.cnblogs.com/dengbiao/p/13470506.html