CTE 中的 ParseError - Hive

ParseError in CTE - Hive

CTE 给出 parseError:ParseException 行 1:42 不匹配的输入 'as' 期望)在 'cust_xref_id' 附近

with table1 as 
(select 2020.cust_xref_id as 2020_cust, 2019.cust_xref_id as 2019_cust
from dea.sp_2020_us as 2020
left join dea.sp_2019_us as 2019
on 2020.cust_xref_id = 2019.cust_xref_id)
select count(distinct(*))
from tabel1
where 2019_cust is not null;

想不通哪里错了。 如有任何帮助,我们将不胜感激!

如果列名不是以字符串开头,我们必须用反引号将名称括起来 (2020_cust`).