Tesla Interview Question

1. When will you use cte vs subquery