title: SQL Server Return Null if exists
body: <p>In SQL Server 2008 I am looking to create a query that will return a NULL in an aggregate if one exists, otherwise I'm looking for the maximum. This is a simplified example...</p>
  
  <p>I have the following data:</p>
  
  <pre><code>    CO  Loc Term_Dt
      1   A   7/15/2013
      1   B
      1   C   10/30/2000
      2   A   8/10/2008
      2   B   6/1/2015
      2   C   4/30/2010
  </code></pre>
  
  <p>The result I'm looking for is:</p>
  
  <pre><code>    CO  Term_Dt
      1   NULL
      2   6/1/2015
  </code></pre>
  
  <p>because technically the Company is still open if at least one location has not yet been terminated.</p>
  
  <p>Thanks</p>