google-bigquery - 语法错误:预期输入结束,但在
问题描述
这是我试图在 BigQuery 中运行的内容,但不断收到错误代码。我究竟做错了什么?
#显示吸烟者的死亡人数
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
解决方案
在 gen.male_smokers 第 1 行后添加逗号
之前必须有一些聚合函数(PARTITION BY dea.location order by dea.location, dea.population)作为 RollingWomen
推荐阅读
- ms-access - 将数据添加到主表上的多条记录的链接表
- reactjs - 选择事件和默认值的打字稿转换错误
- python-3.x - 如何在 python DataFrame 中使用条件创建新列?
- autohotkey - 为什么 {Home} 会在 AutoHotKey 代码段中添加一个空格?
- c# - .NET 条形码的 iText7
- php - PHP/MySQL:根据用户 ID 显示来自不同表的数据
- typescript - 为什么`数组
, Value` 不能用于获取数组值类型? - ruby-on-rails - 两个模型之间尝试的 Rails db 关联/查询抛出错误
- swift - RxSwift 以时间间隔发出起始值并修改它
- screwdriver-cd - 是否可以将螺丝刀管道连接到 GitHub 组织?