gpt4 book ai didi

google-bigquery - BigQuery - 合并表

转载 作者:行者123 更新时间:2023-12-04 23:48:39 24 4
gpt4 key购买 nike

我在 BigQuery 中有每月数据,但我想创建一个年度数据库,这意味着将 12 个子数据库合并为 1 个。

怎么做到呢?

所有 12 个数据库的结构在形式上都是相同的:

Date, Name, Amount, Value, Type_of_Good



我认为 JOIN 可能对我有帮助,但事实并非如此。

谢谢

最佳答案

您可以使用以下语法

SELECT Date, Name, Amount, Value, Type_of_Good
FROM
(select Date, Name, Amount, Value, Type_of_Good from january ...),
(select Date, Name, Amount, Value, Type_of_Good from february ...),
...
(select Date, Name, Amount, Value, Type_of_Good from december ...)

关于google-bigquery - BigQuery - 合并表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27886511/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com