ChenMed Interview Question

Correlated SQL queries, when would you use it and why? What executes first, inner or outer ?

Interview Answer

Anonymous

Aug 1, 2022

outer query is executed first. It is slow but you could use it for row by row comparison and it is similar to recursion, for example find the second highest paid doctor.

1