<?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>Welcome to new things</blog_title>
  <blog_url>https://www.ekwbtblog.com/</blog_url>
  <categories>
    <anon>Azure</anon>
    <anon>DATE_TRUNC</anon>
    <anon>MSSQL</anon>
    <anon>SQL</anon>
    <anon>SQL Database</anon>
    <anon>SQL Server</anon>
    <anon>data analysis</anon>
  </categories>
  <description>To aggregate data by month/week, first find the beginning date of the month/week of the date and GROUP by that beginning date. If the DATE_TRUNC() function can be used to get the head date, such as Google BigQuery, you can aggregate the data as follows. SELECT DATE_TRUNC(dt, MONTH) AS dt_month ,SUM(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.ekwbtblog.com%2Fentry%2F2019%2F09%2F13%2F152749&quot; title=&quot;How to do monthly/weekly aggregation in SQL Server - Welcome to new things&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/20190627/20190627001546.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-09-13 15:27:49</published>
  <title>How to do monthly/weekly aggregation in SQL Server</title>
  <type>rich</type>
  <url>https://www.ekwbtblog.com/entry/2019/09/13/152749</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
