Skip to content
Advertisement

Convert nested select to join

Account Table:

enter image description here

Advertisement

Answer

Your query is probably more efficient than a join/group by version, but it is equivalent to:

I should note that if all banks have loans (which seems reasonable) no JOIN is necessary:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement