我想引用計數(*),將其保存爲總以後引用它,但它不工作COUNT(*),並作爲蜂巢
爲如:
select ((count(*) as total)-count(a)),
(total - count(b)),
(total - count(c))
from table;
什麼問題?
我知道它可以通過
select (count(*) -count(a)),
(count(*) - count(b)),
(count(*) - count(c))
from table;
做,但我想使用COUNT(*)只有一次,它保存爲一個變量,並使用該變量