<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>oinusama</author_name>
  <author_url>https://blog.hatena.ne.jp/oinusama/</author_url>
  <blog_title>おもしろ日記パワー</blog_title>
  <blog_url>https://oinusama.hatenadiary.org/</blog_url>
  <categories>
    <anon>MySQL</anon>
    <anon>SQL</anon>
    <anon>備忘録</anon>
  </categories>
  <description>pointフィールドを元に、降順で自分の順位を求める。※存在しないidでも_rank_が1になるので要注意 ▼pointが同値の場合、タイ扱い SELECT count(*)+1 AS _rank_ FROM HOGE_TABLE WHERE point &gt; (select point FROM HOGE_TABLE WHERE id = ?); ▼pointが同値の場合、DISTINCTでまとめて重複を除外 SELECT count(DISTINCT point)+1 AS _rank_ FROM HOGE_TABLE WHERE point &gt; (select point FROM HOG…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Foinusama.hatenadiary.org%2Fentry%2F20120508%2Fp1&quot; title=&quot;順位を取得。※但し参照するレコードが増えるとクソ重い - おもしろ日記パワー&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-05-08 00:00:00</published>
  <title>順位を取得。※但し参照するレコードが増えるとクソ重い</title>
  <type>rich</type>
  <url>https://oinusama.hatenadiary.org/entry/20120508/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
