SQL - Common Table Expressions (CTEs)
Consider this query:
What is the output?
WITH cte1 AS (SELECT 'A' AS letter UNION ALL SELECT 'B'), cte2 AS (SELECT letter FROM cte1 WHERE letter = 'B') SELECT * FROM cte2;
What is the output?
