title: How to SELECT DISTINCT of one column and get the others?
body: <p>I have a table like this (but with more columns):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Code</th>
  <th>Quantity</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>00001</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00002</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00002</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00002</td>
  <td>2</td>
  </tr>
  <tr>
  <td>00003</td>
  <td>2</td>
  </tr>
  <tr>
  <td>00003</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>And I want to get the same result as with <code>SELECT DISTINCT Code FROM table</code> (00001,00002,00003) but with all of the other table columns.</p>
  <p>If I perform <code>SELECT DISTINCT Code, Quantity from table</code>
  I get:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Code</th>
  <th>Quantity</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>00001</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00002</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00002</td>
  <td>2</td>
  </tr>
  <tr>
  <td>00003</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00003</td>
  <td>2</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>But I would like to get:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Code</th>
  <th>Quantity</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>00001</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00002</td>
  <td>1</td>
  </tr>
  <tr>
  <td>00003</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>