【发布时间】:2014-02-25 04:32:13
【问题描述】:
我正在尝试引用 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(*) 一次,将其存储为变量并使用该变量
【问题讨论】:
标签: hadoop hive hadoop-streaming hiveql