title: SQL Azure - Create complex Pivot Table
body: <p>This question is all for SQL Azure. I have a data set for various commodity prices by year and a unit price like:</p>
  
  <p>Rice - 2007 - 0.5<br>
  Rice - 2007 - 0.3<br>
  Rice - 2007 - 0.8<br>
  Wheat - 2006 - 1.1<br>
  Wheat - 2006 - 1.4<br>
  etc</p>
  
  <p>How can I create a pivot table that gives me the MAX and MIN price paid for each year for each commodity? I know how to do a pivot table that would give me something like the average - thats pretty easy. But I need my "main" pivot column to be the year and then each year would have its 2 "sub columns" for a MIN and MAX price and I'm not quite sure how to do that. Help!</p>