<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gothedistance</author_name>
  <author_url>https://blog.hatena.ne.jp/gothedistance/</author_url>
  <blog_title>Life is Really Short, Have Your Life!!</blog_title>
  <blog_url>https://aroundthedistance.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Mysql</anon>
  </categories>
  <description>JOIN先がNULLになる場合にどういう処理を行うのが最適なのか。 最適解を求めて悩み始めたので、ココはお悩みを晒してみる。 こんな感じのテーブル構成になっています。 やりたいことは、usersとattendsをくっつけて、attendsのevent_idをキーにこういう結果を返すこと。 user_idusernamestatus 1test参加 2test2参加 3test3NULL 単純にLEFT JOINしてもwhere句で絞り込んでしまうと「参加表明すらしてない人」＝「Attendsにレコードが無い人」を取得出来ない・・・！ PostgesqlやOracleだとJOIN先のレコードが存…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Faroundthedistance.hatenadiary.jp%2Fentry%2F2010%2F12%2F10%2F174332&quot; title=&quot;JOIN先にNULLレコードを含んでひとつの表にしたい - Life is Really Short, Have Your Life!!&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>http://cdn-ak.f.st-hatena.com/images/fotolife/a/aroundthedistance/20101210/20101210171136.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-12-10 17:43:32</published>
  <title>JOIN先にNULLレコードを含んでひとつの表にしたい</title>
  <type>rich</type>
  <url>https://aroundthedistance.hatenadiary.jp/entry/2010/12/10/174332</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
