bush_in.sql 365 B

1234567891011
  1. PRAGMA DisableSimpleColumns;
  2. USE plato;
  3. select * from (
  4. SELECT i1.key AS Key, i1.value as Value, i2.value as Join
  5. FROM Roots AS i1
  6. INNER JOIN Leaves AS i2 ON i1.leaf = i2.key
  7. UNION ALL
  8. SELECT i1.key AS Key, i1.value as Value, i2.value as Join
  9. FROM Roots AS i1
  10. INNER JOIN Branches AS i2 ON i1.branch = i2.key
  11. ) order by Key, Value, Join;