athena-case语句计数

9w11ddsr  于 2021-08-09  发布在  Java
关注(0)|答案(0)|浏览(220)

试图在雅典娜执行以下命令。在我看来,这就像是标准的sql:

select
  count(case when gender='Male' then 1 end) as male_count
  count(case when gender='Female' then 1 end) as female_count,
  count(case when gender is null then 1 end) as other_count,
  count(*) as total_count
from onepercentsampleflattened_90days_parquet;

我得到以下错误:

line 3:3: mismatched input 'count' expecting {<eof>, ',', 'from', 'where', 'group', 'order', 'having', 'limit', 'union', 'except', 'intersect'} (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: d7ccbaef-e5da-4fca-8ae8-60fb8b93ce6c)

感谢您的帮助。谢谢!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题