从这句话中:
SELECT a.comunity, sum(b.cont_woman),sum(b.cont_men)
FROM cont_per_comunity.states_per_comunities a
JOIN cont_per_comunity.cont_per_state b
ON a.state = b.state
WHERE sum(b.cont_woman) >= sum(b.cont_men)
GROUP BY a.comunity;
我得到以下错误:
Error occurred executing hive query: Error while compiling statement: FAILED: SemanticException [Error 10128]: Line 9:6 Not yet supported place for UDAF 'sum'
有没有其他方法来选择数据的总和?
1条答案
按热度按时间yshpjwxd1#
你需要在一段时间内做到这一点
having
子句,或在外部查询中。不能像您正在尝试的那样在where子句中使用聚合函数。试试这个:
或者