Correlated SQL queries, when would you use it and why? What executes first, inner or outer ?
Sigiloso
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.