hadoop - Apache Hive 查询语法
问题描述
编译语句时出错:FAILED: ParseException line 32:1 cannot identify input near '(' 'select' 'count' in expression specification
select bid,pid,cdate,chour ,'n' in_out,count(hc) as total
from
(
select a.mac,a.cdate,a.chour,
(select count(1) from bengo.n_hour_count_1 b
where a.mac=b.mac and a.cdate=b.cdate and a.chour=b.chour+1) as hc
from bengo.n_hour_count_1 a
having hc=0
) g
GROUP BY cdate,chour;
解决方案
推荐阅读
- python-3.x - pymongo.errors.WriteError:更新路径“更新”会在“更新”处产生冲突
- php - 作为开发人员,我如何在 Moodle 中进行调试?
- c++ - 如何在 C++ 结构初始化中获取成员
- css - 如何在Angular中动态设置背景图标的宽度
- optimization - or-tools Employee Scheduling 顺序分配员工组
- javascript - 我的代码中的js日期的月份和日期问题
- react-native - react-native:除非连接到更深层次,否则 redux 商店不会重新渲染组件
- apache-kafka - 如何在 Spring Cloud Kafka Streams 应用程序中执行 flatTransform?
- angular - 如何在 codemirror 上显示 JSON?
- python - Json中的错误,在python和powershell之间来回传递数据,使用powershell脚本