tableHiveCell
Java コードとから 2 つのテーブルを作成しましtableHiveWiFi
た。
次のSQLコマンドを実行しようとすると:
select count(UEs.cnc) as 'Active UEs'
^
from
(select distinct cnc from tableHiveCell wifi
union
select distinct cnc from tableHiveCell cell)
as UEs;
エラーが発生します:
java.sql.SQLException:
Query returned non-zero code: 11,
cause: FAILED: Parse Error: line 1:22 mismatched input 'as' expecting FROM near ')' in from clause
at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:189).
私は何か見落としてますか?
[編集1]
私は試した:
select count(UEs.cnc) as 'Active UEs'
^
from
(select distinct cnc from tableHiveCell wifi)
union
(select distinct cnc from tableHiveCell cell)
as UEs;
同じエラー
[編集2]
私は試した:
select count(UEs.cnc) as Active_UEs
from (select distinct cnc from tableHiveCell wifi
union ALL
select distinct cnc from tableHiveCell cell) as UEs;
^
同じエラーが最後に発生しますas
:
line 1:142 mismatched input 'as' expecting Identifier near ')' in subquery source