title: SQL find rows in groups where a column has a null and a non-null value
body: <h1>The Data</h1>
  
  <pre><code>   row    ID YEAR  PROD STA                    DATE
      01    01 2011 APPLE NEW 2011-11-18 00:00:00.000
      02    01 2011 APPLE NEW 2011-11-18 00:00:00.000
      03    01 2013 APPLE OLD NULL
      04    01 2013 APPLE OLD NULL
      05    02 2013 APPLE OLD 2014-04-08 00:00:00.000
      06    02 2013 APPLE OLD 2014-04-08 00:00:00.000
      07    02 2013 APPLE OLD 2014-11-17 10:50:14.113
      08    02 2013 APPLE OLD 2014-11-17 10:46:04.947
      09    02 2013 MELON OLD 2014-11-17 11:01:19.657
      10    02 2013 MELON OLD 2014-11-17 11:19:35.547
      11    02 2013 MELON OLD NULL
      12    02 2013 MELON OLD 2014-11-21 10:32:36.017
      13    03 2006 APPLE NEW 2007-04-11 00:00:00.000
      14    03 2006 APPLE NEW 2007-04-11 00:00:00.000
      15    04 2004 APPLE OTH 2004-09-27 00:00:00.000
      16    04 2004 APPLE OTH NULL
  </code></pre>
  
  <p>ROW is not a column in the table. Is just to show which records i want.</p>
  
  <h1>The question</h1>
  
  <p>I need to find rows where a group consisting of (ID, YEAR, PROD, STA) has at least one NULL DATE and a non-NULL DATE. </p>
  
  <h1>Expected result</h1>
  
  <p>From the above dataset this would be rows 9 to 12 and 15 to 16</p>
  
  <p>Im sitting in front od SSMS and have no idea how to get this. Thinking about <code>group by</code> and <code>exists</code> but really no idea.</p>