<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pospome</author_name>
  <author_url>https://blog.hatena.ne.jp/pospome/</author_url>
  <blog_title>pospomeのプログラミング日記</blog_title>
  <blog_url>https://www.pospome.work/</blog_url>
  <categories>
    <anon>MySQL</anon>
  </categories>
  <description>group by の結果を order by rand() でランダムに出力しようとしてもできない。 そんなときは order by rand() した結果を from に当てはめて出力する。構文は違うけど、ニュアンス的には以下になる。select url, name, mail from order by url;上記を from に突っ込んで group by する。select url, name, mail from (select url, name, mail from order by url) group by url;これで url の重複を削除したname, mail が1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.pospome.work%2Fentry%2F20121104%2F1352011227&quot; title=&quot;order by rand() の group by - pospomeのプログラミング日記&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>2012-11-04 15:40:27</published>
  <title>order by rand() の group by</title>
  <type>rich</type>
  <url>https://www.pospome.work/entry/20121104/1352011227</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
