<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kwbtblog</author_name>
  <author_url>https://blog.hatena.ne.jp/kwbtblog/</author_url>
  <blog_title>新しいことにはウェルカム</blog_title>
  <blog_url>https://www.kwbtblog.com/</blog_url>
  <categories>
    <anon>BigQuery</anon>
    <anon>GCP</anon>
    <anon>Google Cloud Platform</anon>
    <anon>SQL</anon>
    <anon>データ分析</anon>
  </categories>
  <description>日付で飛び飛びなデータを集計する時には、カレンダーテーブルが欲しくなることがあります。 Google BigQueryでは下記でカレンダーテーブルを作成できます。 「GENERATE_DATE_ARRAY()」でカレンダー配列が作れるので、「UNNEST()」で配列を行に展開してテーブル化します。 SELECT * FROM UNNEST( GENERATE_DATE_ARRAY( '2019-01-01', '2019-12-31', INTERVAL 1 DAY) ) AS date INTERVAL &lt;INT&gt; &lt;DATE_PART&gt;で日付間隔を変えれます。 例えば、毎月１日のカレンダー…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.kwbtblog.com%2Fentry%2F2019%2F02%2F23%2F002736&quot; title=&quot;Google BigQueryでカレンダーテーブルを作る方法 - 新しいことにはウェルカム&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kwbtblog/20190314/20190314042126.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-02-23 00:27:36</published>
  <title>Google BigQueryでカレンダーテーブルを作る方法</title>
  <type>rich</type>
  <url>https://www.kwbtblog.com/entry/2019/02/23/002736</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
