title: How to query Azure DocumentDB with an equivalent of the SELECT DISTINCT statement
body: <p>DocumentDb don't support the <code>DISTINCT</code> statement. I have documents in DocumentDB with the following structure (thousands of documents):</p>
  
  <pre><code>{
      "type" : "type1",
      "data" : {
          ...
      }
  },{
      "type" : "type2",
      "data" : {
          ...
      }
  },{
      "type" : "type2",
      "data" : {
          ...
      }
  },{
      "type" : "type2",
      "data" : {
          ...
      }
  }
  </code></pre>
  
  <p>How can I query the collection and get the following result:</p>
  
  <pre><code>{
      "type" : "type1"
  },{
      "type" : "type2"
  }
  </code></pre>