We’ve had some questions about what a Common Table Expression (CTE) is. Patrick describes what they are and how you can use them in SQL Server or Azure Synapse Analytics.

WITH common_table_expression (Transact-SQL)
https://learn.microsoft.com/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-ver16

Sample Scripts – https://github.com/guyinacube/demo-files/tree/master/video%20demos/Synapse