LoginSignup
18
1

More than 5 years have passed since last update.

BigQueryで無から日付マスタを生成する方法

Posted at

以下のクエリで今日から10日分の日付情報のテーブルを生成できます。

#standardSQL
SELECT DATE_ADD(CURRENT_DATE('Asia/Tokyo'), INTERVAL n DAY) AS date FROM UNNEST(GENERATE_ARRAY(0, 9)) AS n ORDER BY n
18
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
1