<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>aewshyae</author_name>
  <author_url>https://blog.hatena.ne.jp/aewshyae/</author_url>
  <blog_title>冷たい荒野を飼う</blog_title>
  <blog_url>https://aewshyae.hatenadiary.jp/</blog_url>
  <categories>
    <anon>SAS</anon>
    <anon>SQL</anon>
  </categories>
  <description>最も近い値を持つデータを別のデータセットからマッチングする方法について考える話この記事を読みまして、直積にはなるけどSQL一発で書けるよな、と思って書いてみました。 proc sql; create table result as select T1.ID, T1.X, T1.ID2, T1.Y, T1.diff from ( select Q1.ID, Q1.X, Q2.ID2, Q2.Y, abs(Q1.X-Q2.Y) as diff from Q1 cross join Q2) as T1 group by T1.ID,T1.X having T1.diff = abs(T1.X-T1.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Faewshyae.hatenadiary.jp%2Fentry%2F20150121%2F1421844142&quot; title=&quot;「最も近い値を持つデータを別のデータセットからマッチングする方法について考える話」をSQLで考える話 - 冷たい荒野を飼う&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-01-21 21:42:22</published>
  <title>「最も近い値を持つデータを別のデータセットからマッチングする方法について考える話」をSQLで考える話</title>
  <type>rich</type>
  <url>https://aewshyae.hatenadiary.jp/entry/20150121/1421844142</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
