title: What is the best way to do a sub query for a max on 2 columns in T-SQL
body: <p>I have three tables.</p>
  <ul>
  <li><code>Sales_Header</code>: Sales_Ordernum, Customer, Total Cost</li>
  <li><code>Sales Details</code>: Sales_Ordernum, Product_number, Sales_Cost</li>
  <li><code>Product</code>: Product_number, Product_name, Product_height, Product_length</li>
  </ul>
  <p>For delivery purposes I want to return the maximum value of <code>Product_height</code> and <code>Product_length</code> could be from multiple products in the product table.</p>
  <p>So I would like the output to look like this:</p>
  <pre><code>Sales_Ordernum,
  Customer,
  Max_Productheight,
  Max_Productlength
  </code></pre>
  <p>Any help appreciated</p>
  <p>Thanks</p>