<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thinkAmi</author_name>
  <author_url>https://blog.hatena.ne.jp/thinkAmi/</author_url>
  <blog_title>メモ的な思考的な</blog_title>
  <blog_url>https://thinkami.hatenablog.com/</blog_url>
  <categories>
    <anon>Drizzle</anon>
    <anon>SQL</anon>
  </categories>
  <description>以前、SQLのCTEを使って階層構造を持つデータから、祖先のデータを取得してみました。 django-cteと共通テーブル式(CTE)を用いた再帰クエリにより、階層構造を持つテーブルからデータを取得する - メモ的な思考的な このときは django-cte の利用がメインだったため、祖先は1つ (りんごの種子親) だけを扱いました。 ただ、現実のりんごの祖先は単一ではなく、 花粉親 (父) 種子親 (母) がそれぞれ存在します。また、当然ながら、それ以前の代のりんごも存在します。 例えば、シナノリップの場合、祖先をたどると以下のような感じになります。 シナノリップ (父) シナノレッド (父…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthinkami.hatenablog.com%2Fentry%2F2024%2F09%2F15%2F165859&quot; title=&quot;親子情報を持つテーブルとSQLの共通テーブル式(CTE)を使って、曽祖父母までの祖先を取得する - メモ的な思考的な&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>2024-09-15 16:58:59</published>
  <title>親子情報を持つテーブルとSQLの共通テーブル式(CTE)を使って、曽祖父母までの祖先を取得する</title>
  <type>rich</type>
  <url>https://thinkami.hatenablog.com/entry/2024/09/15/165859</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
