简体   繁体   English

语法错误:预期的输入结束但在

[英]Syntax error: Expected end of input but got "(" at

Here's what I am trying to run in BigQuery, but keep getting error code.这是我尝试在 BigQuery 中运行的内容,但不断收到错误代码。 What am I doing wrong?我究竟做错了什么?

#Show number of deaths of is person was smoker #显示吸烟者的死亡人数

select dea.location, dea.population, gen.female_smokers, gen.male_smokers
sum(female_smokers) as TotalFemales, sum(gen.male_smokers) as TotalMale over (PARTITION BY dea.location order by dea.location, dea.population) as RollingWomen
FROM capstone-project-317016.Portfolio1.CovidDeaths dea;
join capstone-project-317016.Portfolio1.CovidbyGender gen
on dea.location = gen.location
and dea.population = gen.population
where dea.location is not null
group by dea.population

Add comma after gen.male_smokers line 1在 gen.male_smokers 第 1 行之后添加逗号

There must be some aggregate function before over (PARTITION BY dea.location order by dea.location, dea.population) as RollingWomen在结束之前必须有一些聚合 function (PARTITION BY dea.location order by dea.location, dea.population) 作为 RollingWomen

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 LEFT JOIN IN BigQuery 语法错误:预期输入结束,但在 [7:1] 处获得关键字 - LEFT JOIN IN BigQuery Syntax error: Expected end of input but got keyword ON at [7:1] 语法错误:预期输入结束,但在 [2:1] 处得到标识符“CONCAT_WS” - Syntax error: Expected end of input but got identifier “CONCAT_WS” at [2:1] 语法错误:预期输入结束,但在 [14:1] 获得关键字 LEFT - Syntax error: Expected end of input but got keyword LEFT at [14:1] 获取语​​法错误:预期输入结束,但在 [5:1] 处获得关键字 ORDER:在 BigQuery 中 - Get Syntax Error: Expected end of input but got keyword ORDER at [5:1]: in BigQuery 如何在 Big Query 中修复此错误?:语法错误:预期输入结束,但在 [3:11] 得到“(” - How do I fix this error in Big Query?: Syntax error: Expected end of input but got "(" at [3:11] 语法错误预期输入结束但得到关键字 CREATE Google Cloud BigQuery - syntax error expected end of input but got keyword CREATE Google Cloud BigQuery 错误:语法错误:预期为“)”,但子查询中的语句case语句结束 - Error: Syntax error: Expected “)” but got end of statement case statements in subquery BadRequest:400 语法错误:预期输入结束 - BadRequest: 400 Syntax error: Expected end of input BigQuery SQL 语法错误:预期为“(”或“”或关键字 SELECT 但在 [9:2] 处结束脚本 - BigQuery SQL syntax error: Expected "(" or "," or keyword SELECT but got end of script at [9:2] 语法错误:应为“(”或“,”或关键字 SELECT 但脚本结束 - Syntax error: Expected "(" or "," or keyword SELECT but got end of script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM