A task on recursive tree building. **Condition:** Find all product categories whose depth in the tree is greater than 2 (subcategories of subcategories). **Table:** product_categories (category_id, category_name, parent_category_id, description) **Requirements:** 1. Build the category tree recursively 2. Calculate the depth of each category (root = 0) 3. Filter categories with depth > 2 4. Output category_id, category_name, depth, full_path **Hint:** In the recursive CTE, accumulate depth
Sign in to solve
Start Solving