title: SQL Selecting multiple columns based on max value in one column
body: <p>OK so I have looked theough the other solutions an no help. So here is what I am trying to do.
  I need to select the row with multiple columns where the value in one column is the max value.</p>
  
  <p>here is sample data</p>
  
  <pre><code>    orderfileid item number item cost   warehouse
      1           1234        3.45             ATL
      1           2345        1.67             DFW
      3           2345        2.45             NYY
      3           678         2.4              ORD
      2           1234        1.67             DFW
  </code></pre>
  
  <p>I need to select the entire row where the orderfileid is the max for each unique item number</p>
  
  <p>the returned dataset should look like</p>
  
  <pre><code>    orderfileid item number item cost   warehouse
      2           1234        1.67             DFW
      3           2345        2.45             NYY
      3           6789        2.4              ORD
  </code></pre>
  
  <p>I think i tried every combination of select max(orderfileid) i can think of</p>
  
  <p>Any help would be appriciated.
  thanks</p>