left_only_with_other.sql 359 B

1234567891011121314
  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 Input1);
  6. --INSERT INTO Output
  7. SELECT
  8. i1.*
  9. FROM $data1 as i1
  10. LEFT ONLY JOIN $data2 as i2 ON i1.key = i2.key
  11. JOIN $data1 as i3 ON i1.key = i3.key
  12. ;