yql-14829_left.sql 444 B

1234567891011121314151617181920212223242526272829303132333435
  1. USE plato;
  2. pragma yt.JoinEnableStarJoin="true";
  3. insert into @x
  4. select Just('xxx') as id
  5. order by id;
  6. insert into @y
  7. select Just('yyy') as id
  8. order by id;
  9. insert into @a
  10. select Just('aaa') as id
  11. order by id;
  12. commit;
  13. $xy_left = (
  14. SELECT
  15. x.id AS id
  16. FROM
  17. ANY @x AS x
  18. LEFT JOIN ANY @y AS y
  19. ON x.id == y.id
  20. );
  21. SELECT
  22. *
  23. FROM
  24. ANY @a AS a
  25. LEFT JOIN ANY $xy_left AS b
  26. ON a.id == b.id;