Recursive CTE is basically used when you want to form hierarchy .i.e If you have one task and it's has multiple sub task and sub task also have other task then you can use the recursive CTE to define the relationship or hierarchy of task