我正在配置单元中执行以下命令:
Select child.data_volume_gprs_dl + child.data_volume_gprs_ul as data_usage,
parent.file_name,
parent.record_number
from table1 as parent
left join table2 child
on parent.file_name = child.file_name
and parent.record_number = child.record_number
where parent.served_imsi like '310120%'
or parent.served_imsi like '312530%'
and parent.serving_node_plmn_id like '310260%'
and parent.date_part = 20191201
group by parent.file_name, parent.record_number
错误:编译语句时出错:失败:semanticexception[error 10025]:行1:7表达式不在group by键“data\u volume\u gprs\u dl”(state=42000,code=10025)
为什么我会犯这个错误?
1条答案
按热度按时间q3qa4bjr1#
所有非聚合列都应位于
GROUP BY
列表,例如如果你需要分组
parent.file_name
以及parent.record_number
仅列,则可以应用聚合(sum()
,avg()
,count()
)其他列的函数。偶数加法sum(child.data_volume_gprs_dl + child.data_volume_gprs_ul)
也许有可能。