title: Reducing number of query for inner join when joining base on same table
body: <p>Part 2 follow up of <a href="https://stackoverflow.com/questions/47231035/faster-way-to-union-table-sql">Faster way to union table SQL</a></p>
  
  <p>I have TABLE_A</p>
  
  <pre><code> from_bank_id          to_bank_id        amount
   1                     null              100        
   null                  1                 200
   1                     null              300        
   null                  2                 200
  </code></pre>
  
  <p>I have TABLE_B</p>
  
  <pre><code>bank_id      name
  1            'BOA'
  2            'SOME_BANK'
  </code></pre>
  
  <p>I need to output</p>
  
  <pre><code> from_bank_id  to_bank_id   amount   from_bank_name  to_bank_name
   1             null         100     'BOA'            null
   null          1            200      null            'BOA'
   1             null         300     'BOA'            null      
   null          2            200      null            'SOME_BANK'
  </code></pre>
  
  <p>Right now I am doing</p>
  
  <pre><code>SELECT 
     t1.* 
     t2.name as from_bank_name,
     t3.name as to_bank_name
     FROM TABLE_A as t1
     LEFT OUTER JOIN TABLE_B as t2 ON t1.from_bank_id = t2.bank_id
     LEFT OUTER JOIN TABLE_B as t3 ON t1.to_bank_id = t3.bank_id
  </code></pre>
  
  <p>1) Is there a more elegant way of achieving this?
  2) How many query to database am I making to TABLE_B? I am guessing 2? one for each join?</p>