From eaba681056d2cd9f0b30c852eddf590ace32fb15 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 7 Jan 2025 08:19:18 +0000 Subject: [PATCH] Add example --- .../subqueries-and-ctes/lessons/common-table-expressions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/courses/sql-mastery/chapters/subqueries-and-ctes/lessons/common-table-expressions.md b/src/data/courses/sql-mastery/chapters/subqueries-and-ctes/lessons/common-table-expressions.md index ef2a4ad58..b5b38169a 100644 --- a/src/data/courses/sql-mastery/chapters/subqueries-and-ctes/lessons/common-table-expressions.md +++ b/src/data/courses/sql-mastery/chapters/subqueries-and-ctes/lessons/common-table-expressions.md @@ -111,6 +111,7 @@ Here are some of the benefits you get when using CTEs: - **Improved Readability**: By breaking down complex queries into named parts, the code becomes easier to understand. - **Code Reusability**: You can reference the same CTE multiple times in your main query. - **Better Maintenance**: When you need to modify the logic, you only need to change it in one place. +- **Ease of Testing**: You can test each CTE independently. Let's look at a more complex example that demonstrates these benefits. This query calculates monthly sales statistics for books.