title: OrderBy With A Secondary Sub Sort
body: <p>I have a query that I need to build that sorts items by a matching priority; however, when there are instances where I have a duplicate product, I'd like it to be grouped with highest priority on the initial match.   Not sure if this is possible or not in MySQL out of the gate or if I need to post process this in PHP or JS.</p>
  
  <pre><code>+-------+----------+---------+
  | order_id | Priority | Product |
  +-------+----------+---------+
  | 12345 |        1 |  334455 |
  | 12345 |        1 |  212121 |
  | 12355 |        2 |  666666 |
  | 12356 |        3 |  212121 |
  | 12360 |        4 |  777777 |
  +-------+----------+---------+
  </code></pre>
  
  <p>What I have tried and it fails of course.  I tried using "FIELD()" and does the same thing.   </p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT Order_id, Priority, Product FROM Products ORDER BY Priority ASC, Product
  </code></pre>
  
  <p><strong>Desired Result</strong></p>
  
  <pre><code>+-------+----------+---------+
  | Order_id | Priority | Product |
  +-------+----------+---------+
  | 12345 |        1 |  334455 |
  | 12345 |        1 |  212121 |
  | 12356 |        3 |  212121 |
  | 12355 |        2 |  666666 |
  | 12360 |        4 |  777777 |
  +-------+----------+---------+
  </code></pre>