title: How to sort the items then sort again by another condition using SQL
body: <p>I'm using MySQL, and I want to sort a record or I want to group a record then sort it again by another condition like for example I have 6 items,</p>
  
  <pre><code>Names Group
  Jack  G1
  Dian  G2
  Emily G2
  Dean  G1
  Teddy G2
  Gabe  G1
  </code></pre>
  
  <p>So I want to sort this by group in alphabetized orby by name. Like,</p>
  
  <pre><code>Dean  G1
  Gabe  G1
  Jack  G1
  Dian  G2
  Emily G2
  Teddy G2
  </code></pre>
  
  <p>So my problem is, how can I sort like this in MySQL?</p>
  
  <p>Thanks.</p>