title: How to query and filter the minimum value in one column while keeping the other columns in SQL
body: <p>How can I keep only the minimum value in one column while preserving the rest of the data in the other columns in SQL?  I'm trying to filter the field 'OrderID' to exhibit the lowest order# by CustomerID and Level.</p>
  <p>Table:</p>
  <pre><code>Order# |CustomerID | Level
  12345  | 200       | 3
  12389  | 200       | 3
  12590  | 200       | 3
  12790  | 200       | 4
  13091  | 200       | 5
  15678  | 500       | 3
  15788  | 500       | 4
  16100  | 500       | 4
  16990  | 500       | 5
  17331  | 600       | 3
  17660  | 600       | 4
  17700  | 600       | 5
  </code></pre>
  <p>My goal is identify the when the CustomerID hit level 3,4,5 the first time based on their Order# by having a Result table below.</p>
  <p>All other Order#'s after they hit the level are removed and a new column Level 3, Level 4, and Level 5 are created to indicate what was the order number that met those level thresholds.</p>
  <p>Result</p>
  <pre><code>CustomerID | Level 3 | Level 4| Level 5
  200        | 12345   | 12790  | 13091
  500        | 15678   | 15788  | 16990
  600        | 17331   | 17660  | 17700
  
  </code></pre>
  <p>Thank you in advance for your time.</p>