<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hit10231023</author_name>
  <author_url>https://blog.hatena.ne.jp/hit10231023/</author_url>
  <blog_title>Database JUNKY</blog_title>
  <blog_url>https://hit.hateblo.jp/</blog_url>
  <categories>
    <anon>MySQL8</anon>
    <anon>WITH</anon>
    <anon>CTE</anon>
    <anon>ORDER BY</anon>
    <anon>NULL</anon>
    <anon>シーケンス</anon>
    <anon>UPDATE JOIN</anon>
    <anon>JOIN UPDATE</anon>
    <anon>WINDOW関数</anon>
    <anon>SQL</anon>
  </categories>
  <description>とあるデータのクレンジング、名寄せ作業をSQLだけで完結する上で、よくわからなくなってしまったので、メモします。 例えば、こんな定義とデータがあったとして。 定義 CREATE TABLE `artist_master` ( `Id` bigint(20) unsigned NOT NULL, `CreatedAt` datetime DEFAULT CURRENT_TIMESTAMP, `Valid` tinyint(4) NOT NULL DEFAULT '1', `Name` varchar(128) NOT NULL, `VideoCount` bigint(20) unsigned …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhit.hateblo.jp%2Fentry%2Fmysql8%2Fsql%2Fwindow-function-and-cte-table&quot; title=&quot;MySQL8 SQL Window関数とCTE表でデータクレンジングと名寄せを実現する - Database JUNKY&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/h/hit10231023/20180309/20180309104332.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-10-29 21:17:54</published>
  <title>MySQL8 SQL Window関数とCTE表でデータクレンジングと名寄せを実現する</title>
  <type>rich</type>
  <url>https://hit.hateblo.jp/entry/mysql8/sql/window-function-and-cte-table</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
