Oracle - which bank holds most money based on the customers accounts
<p>Trying to figure out which bank holds the most money..</p>

<pre><code>SELECT *
FROM bank B
WHERE BSB IN (SELECT max(balance)
              FROM   registered R, Account A
              WHERE  R.BSB = B.BSB
              AND    A.accountNumber = R.accountNumber);
</code></pre>