Tags / common-table-expression
Understanding the Pitfalls of Using Common Table Expressions in DELETE Statements
Optimizing Multiple Common Table Expressions in SQL Server 2014 for Enhanced Query Performance and Readability
How to Delete Every Nth Row from a Result Set Using SQL Window Functions and Computed Index Columns
How to Use SQL Union to Combine Queries with Different Number of Rows