title: Select distinct rows from MongoDB
body: <p>How do you select distinct records in MongoDB? This is a pretty basic db functionality <em>I believe</em> but I can't seem to find this anywhere else.</p>
  
  <p>Suppose I have a table as follows</p>
  
  <pre><code>--------------------------
  | Name    | Age          |
  --------------------------
  |John     | 12           |
  |Ben      | 14           |
  |Robert   | 14           |
  |Ron      | 12           |
  --------------------------
  </code></pre>
  
  <p>I would like to run something like <code>SELECT DISTINCT age FROM names WHERE 1;</code></p>