left_semi_with_other.sql 386 B

123456789101112131415
  1. PRAGMA DisableSimpleColumns;
  2. /* postgres can not */
  3. USE plato;
  4. $data1 = (select cast(key as uint32) as key, subkey, value from Input1);
  5. $data2 = (select cast(key as uint32) % 100u as key, subkey, value from Input2);
  6. --INSERT INTO Output
  7. SELECT
  8. i1.*
  9. FROM $data1 as i1
  10. LEFT SEMI JOIN $data2 as i2 ON i1.key = i2.key
  11. LEFT OUTER JOIN $data1 as i3 ON i1.key = i3.key
  12. ORDER BY i1.key
  13. ;