Skip to content

Commit 828e81f

Browse files
committed
Add Lateral join support in sql/select.rst
1 parent 099bd42 commit 828e81f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

presto-docs/src/main/sphinx/sql/select.rst

+14
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,20 @@ so a cross join between the two tables produces 125 rows::
833833
...
834834
(125 rows)
835835
836+
Lateral
837+
^^^^^^^
838+
839+
Subqueries appearing in the FROM clause can be preceded by the keyword ``LATERAL``. This allows them to reference columns provided by preceding ``FROM`` items.
840+
841+
INNER and LEFT OUTER lateral joins are supported in Presto.
842+
843+
.. code-block:: none
844+
845+
SELECT name, x, y
846+
FROM nation
847+
CROSS JOIN LATERAL (SELECT name || ' :-' AS x)
848+
CROSS JOIN LATERAL (SELECT x || ')' AS y);
849+
836850
Qualifying Column Names
837851
^^^^^^^^^^^^^^^^^^^^^^^
838852

0 commit comments

Comments
 (0)