我有一个Hive般的问题
SELECT Year, Month, Day, Hours, Minutes,
cast((cast(Seconds as int)/15) as int)*15
AS secondMod, Count(*) AS PerCount FROM LoggerTable
GROUP BY Year, Month, Day, Hours, Minutes, secondMod
ORDER BY PerCount;
上述查询失败,出现错误
失败:语义分析出错:行1:175无效的表别名或列引用
“loggertable”是一个配置单元表,所有列都是字符串类型。
有解决这个问题的方法吗?
2条答案
按热度按时间p5cysglq1#
试试这个:
insrf1ej2#
在hive0.11.0及更高版本中,如果
hive.groupby.orderby.position.alias
设置为true
. 请确认以下查询是否适用于您。