title: Custom SQL GROUP BY Clause
body: <p>I have a very customized SQL query that I am having problems implementing.  I am using SQL-Server-2008.</p>
  
  <p>I have only one table in this query, but I am looking for very specific data.  The requirements for this query are:</p>
  
  <p>For each DISTINCT PartNumber (column), I need to select the NEWEST (max) PO (column) to be selected.  However, there is another column named "Receipt" where if it contains a value at all, then the PartNumber should be excluded all together.  </p>
  
  <p>I am somewhat familiar with GROUP BY clauses and CASES for selections, but I'm not sure how to tie all I know together into one working query...</p>
  
  <p>Any help is greatly appreciated!  Thanks in advance =).</p>