无法识别蜂巢附近的输入

时间:2016-12-12 07:15:49

标签: apache hive hiveql

select household,COUNT(*),(COUNT(*))/(select COUNT(*) from finalcampaign) *100 as Higndecimal from finalcampaign group by household;
  

失败:ParseException行1:37无法识别附近的输入' select' ' COUNT' '('在表达式规范中

1 个答案:

答案 0 :(得分:0)

您可以使用如下表格别名来尝试:

select household, COUNT(*), 100*(COUNT(*))/B.CNT from finalcampaign , (select COUNT(*) as CNT from finalcampaign)  As B group by household,B.CNT;