title: How to Order a SQL Query with grouped rows
body: <p>I have the table (Product_Id, category priority, atribute1, atribute2...) in MS Access, and I am trying to make a query that orders the data grouped by Category and ordered by the highest priority. Priority can be Null, so it should be placed at the end.
  Example:
  Table</p>
  
  <pre><code>1, 100, 2, atr1, atr2
  2, 300,  , atr1, atr2
  3, 100, 5, atr1, atr2
  4, 200, 9, atr1, atr2
  5, 100,  , atr1, atr2
  6, 200, 1, atr1, atr2
  </code></pre>
  
  <p>Result expected in Query:</p>
  
  <pre><code>6, 200, 1, atr1, atr2
  4, 200, 9, atr1, atr2
  1, 100, 2, atr1, atr2
  3, 100, 5, atr1, atr2
  5, 100,  , atr1, atr2
  2, 300,  , atr1, atr2
  </code></pre>