Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What does CTE stand for?
Think of temporary results in SQL.
Write a simple CTE to get total sales from an orders table by region.
Remember to use the SUM function and GROUP BY.
What keyword is used to define a CTE?
Think about how we start a new SQL block.
CTEs can reference themselves. Can they be used for hierarchical data?
Consider what recursion allows us to do.
Write a CTE that computes the average sales for each region and returns those above a certain threshold, while using ranking to list them.
Consider how averages are calculated with GROUP BY.
Create a recursive CTE that traces a product's lineage through categories and subcategories, displaying each step.
Focus on constructing the category tree with proper joins.
5 more questions in this section. Enroll free to practise them all.
Enroll free