title: SELECT in SQL Server - alternative to SUBQUERY
body: <p>I have a SELECT statement like this:</p>
  
  <pre><code>SELECT 
  T1.COD,
  T1.NAME, 
  (SELECT MAX(T2.DATA)
    FROM dbo.TAB2 T2
    WHERE T2.COD = T1.COD) AS ENDDATA
  FROM dbo.TAB1 AS T1 WITH (NOLOCK) 
  </code></pre>
  
  <p>Is there an alternative to use SUBQUERY? Is it possible to use JOIN?</p>
  
  <p>I have to find a more efficient solution to run this query.</p>
  
  <p>Thank you very much.</p>