--假设表名为sales (销售)--,含有字段product (产品) ;select product , count(*)from sales group by product;--如果还有流水号id,可以:select product , count(*) --不去重, count(distinct id) --去重from sales group by product;