title: DB Sorting Challenge
body: <p>I have a table as follows,</p>
  
  <pre><code>A   A  
  B   B1  
  A   A1  
  B   B  
  A   A2  
  B   B3  
  A   A3  
  B   B2  
  </code></pre>
  
  <p>My result set should be,  </p>
  
  <pre><code>A   A  
  A   A1  
  A   A2  
  A   A3  
  B   B  
  B   B1  
  B   B2  
  B   B3  
  </code></pre>
  
  <p>Note: A, A1 are all GUIDs.</p>
  
  <p>I have tried quite a few tricks. Please help me solve this problem.</p>