title: Retrieving number of distinct values in Parse?
body: <p>Is there any Parse equivalent to the SQL statement, <code>SELECT DISTINCT</code>? </p>
  
  <p>I have the tables: <em>User</em>, <em>Group</em>, <em>Tag</em>, and <em>Post</em>. Each user has posts and can create tags and groups. The <em>Tag</em> table contains the fields:</p>
  
  <p><code>"name" String</code></p>
  
  <p><code>"post" Pointer&lt;Post&gt;</code></p>
  
  <p><code>"creator" Pointer&lt;_User&gt;</code></p>
  
  <p>I am trying to make a cloud function to return the most popular tags to my Android app for an AutoCompleteTextView. I was thinking that I should just do something like a <code>SELECT DISTINCT name</code> query in Parse and order by descending, but you can't do that in Parse. Is there any workaround for this?</p>
  
  <p>I saw that <a href="https://parse.com/questions/select-distinct-equivalent" rel="nofollow">this post</a> did not get an answer and that <a href="https://parse.com/questions/retrieving-unique-values" rel="nofollow">this post</a> says to work out distinct values client-side.</p>
  
  <p>Thanks</p>