select household,COUNT(*),(COUNT(*))/(select COUNT(*) from finalcampaign) *100 as Higndecimal from finalcampaign group by household;
失败:ParseException行1:37无法识别附近的输入' select' ' COUNT' '('在表达式规范中
答案 0 :(得分:0)
您可以使用如下表格别名来尝试:
select household, COUNT(*), 100*(COUNT(*))/B.CNT from finalcampaign , (select COUNT(*) as CNT from finalcampaign) As B group by household,B.CNT;