Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Basic CTE
14. Summary


Excellent. It's time to wrap things up.

  • We've discussed the following CTEs syntax:
    WITH cte_name1 (cte1_columns) AS (your_cte1),
    cte_name2 (cte2_columns) AS (your_cte2),
    SELECT ...
  • CTEs are placed at the start of the query. They are introduced with the WITH keyword.
  • You can skip column definitions if you provide aliases to columns that contain aggregates and other functions.
  • CTEs are temporary sets of rows. They are similar to subqueries. Thanks to them, your query becomes better organized and easier to read.

Let's do a very short quiz to check how much you remember.


Click Next exercise to start the quiz.