<?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>concat</anon>
    <anon>GROUP</anon>
    <anon>MySQL</anon>
    <anon>SORT</anon>
    <anon>sql</anon>
    <anon>セパレータ</anon>
    <anon>ソート</anon>
    <anon>区切り文字</anon>
    <anon>関数</anon>
    <anon>GROUP_CONCAT</anon>
  </categories>
  <description>いきなりですが、こんな構成のテーブル群があったりします。左記の図では、ユーザー情報を管理する、ユーザーテーブル、およびそのユーザーが持っているスキル を格納しているスキルテーブル、ユーザーとスキルテーブルは、１対多で紐づいています。みたいなよくあるスキーマ構成です。 じゃあ、これを、１レコードで表現してほしいといわれたら、どうやってＳＱＬで書く？プログラムで書くのが一番の近道で簡単なのですが、一時的なものに対してプログラムをいちいち書くのは正直なところ面倒・・・でも、それが、SQLだけで簡単に実現できるのです。そしてそれを実現することができるのが、group_concat関数なのれす！！</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhit.hateblo.jp%2Fentry%2Fmysql%2Fgroup_concat&quot; title=&quot;MySQL すごーーーく便利！ group_concat関数を利用した文字列グルーピング結合！ - 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>2011-10-03 18:04:43</published>
  <title>MySQL すごーーーく便利！ group_concat関数を利用した文字列グルーピング結合！</title>
  <type>rich</type>
  <url>https://hit.hateblo.jp/entry/mysql/group_concat</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
