首页 > 解决方案 > 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;

标签: hadoop

解决方案


推荐阅读