@@ -94,3 +94,62 @@ have to introduce functions. Expanding on the latter query, we could write::
94Now we have a query that, for each ``User``, fetches all orders for that user.
94Now we have a query that, for each ``User``, fetches all orders for that user.
95The final ``return`` means that for each ``User`` and ``Order``, we'll return a
95The final ``return`` means that for each ``User`` and ``Order``, we'll return a
96single row.
96single row.
98+Selecting rows from tables
99+--------------------------
101+With the more theoretical side of ``Query`` considered, we can start looking at
102+the more pragmatic side, and how ``Query`` can express some common SQL idioms.
104+First, one of the most common operations is to select all rows from a *base
105+table*. In SQL, this is a ``SELECT * FROM x`` query, and in Rel8 we use ``each``
106+with a ``TableSchema``.
129+Left (outer) joins with ``optional``
130+------------------------------------