premap_common_left_cross.sql 374 B

12345678910111213
  1. PRAGMA DisableSimpleColumns;
  2. PRAGMA DisablePullUpFlatMapOverJoin;
  3. use plato;
  4. $one = (select key, 1 as subkey, value from Input1);
  5. $two = (select key, value from Input2);
  6. $three = (select key, value, 2 as subkey from Input3);
  7. from $one as a
  8. cross join $two as b
  9. left join $three as c on (c.key = a.key and c.value = b.value)
  10. select * order by a.key,a.subkey,b.key,b.value