mysql嵌套计数-怎么样?

| 这是初始查询:
SELECT COUNT(column) FROM table GROUP BY column;
这给了我类似以下内容:
COUNT(column)
2
4
1
1
3
等等 但是我需要将所有这些加在一起算一个数字!我该怎么办?
COUNT(COUNT(column))
引发错误:\“无效使用组功能\”。 附言如果在任何程序中都没有使用它,那么将它们一起计算将是微不足道的。     
已邀请:
通过以下方式删除组:
select count(column) from table;
如果您需要不同的列:
select count(distinct column) from table; -- might not work in mysql
要么:
select count(*) from (select distinct column from table) as columns;
    
不知道这是否适用于mysql:SELECT COUNT(distinct column)FROM table     

要回复问题请先登录注册