1
SQLAdvanced#cte
A named temporary result set declared with WITH and referenced by the following statement. It improves readability, can be referenced multiple times and supports recursion.
WITH top_customers AS ( SELECT customer_id, SUM(total) AS spend FROM orders GROUP BY customer_id ) SELECT * FROM top_customers WHERE spend > 10000;