O
oceanwave
Unregistered / Unconfirmed
GUEST, unregistred user!
不好意思 后面忘了加GROUP BY,完整如下:
select 购物品种,count(顾客姓名) as 购物次数
from (select distinct 顾客姓名,购物品种 from 销售流水帐)
group by 购物品种
select 购物品种,count(顾客姓名) as 购物次数
from (select distinct 顾客姓名,购物品种 from 销售流水帐)
group by 购物品种