hive3.x的round函数
select si.stu_id ,round(avg(si.score),2) score_avg
from score_info si
group by si.stu_id
having score_avg > 60;
select si.stu_id ,avg(si.score) score_avg
from score_info si
group by si.stu_id
having score_avg > 60;
当加了round后就无法执行,报错:SQL 错误 [10025] [42000]: Error while compiling statement: FAILED: SemanticException [Error 10025]: Line 5:7 Expression not in GROUP BY key '60'
求解释一下为什么。