title: SQL Combining two joins
body: <p>I would say my understanding of SQL is average, but I am wondering if there is any way to more efficiently write this statement?  </p>
  
  <p>The primary key of table <code>Company</code> is <code>uniqentity</code> and has the company name <code>nameof</code> in that row.  </p>
  
  <p>In the table <code>Line</code>, the primary key is <code>uniqline</code> and I have columns <code>entityCompanyBilling</code> and <code>entityCompanyIssuing</code> (both foreign keys to <code>uniqentity</code>).</p>
  
  <p>This code below works just fine, I am just trying to make it more efficient. Is it possible?</p>
  
  <pre><code>SELECT 
     l.uniqline, b.nameof AS billingcompany, 
     l.UniqEntityCompanyBilling, i.nameof AS issuingcompany, 
     l.UniqEntityCompanyIssuing
  FROM 
     Line l 
  INNER JOIN 
     Company b ON b.uniqentity = l.uniqentitycompanybilling
  INNER JOIN 
     Company i ON i.uniqentity = l.uniqentitycompanyissuing 
  </code></pre>