聚合函数非重复(distinct)查询 计算去重后的数据行数 select count(distinct product_type) from product; 计算数据行数后再去重 select distinct count(product_type) from product;