select count(type) from product group by type
结果统计出来的是每组的个数(多行结果)
想统计有多少种类型(单一结果)要怎么写?
除了这种写法,单一语句能完成吗?
select count(1) from (select count(type) from product group by type)
结果统计出来的是每组的个数(多行结果)
想统计有多少种类型(单一结果)要怎么写?
除了这种写法,单一语句能完成吗?
select count(1) from (select count(type) from product group by type)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货