title: Getting distinct rows from Realm table in iOS
body: <p>I am using <strong>Realm</strong> database for iOS application where i have a use case in which i want to filter result set by distinct values for a particular field. This field is not a primary key of the realm table.</p>
  
  <p>I was not able to construct query for that. </p>
  
  <p>Sample query :</p>
  
  <pre><code>RLMResults *allFiles = [FileRLMObject objectsInRealm:realmObject where:@"colA == %@", @"test1"];
  </code></pre>
  
  <p><strong>FileRLMObject</strong> is a subclass of <strong>RLMObject</strong>  from <strong>realm library</strong></p>
  
  <p>here table contains one column with name <strong>colB</strong>. While getting allFiles results, i want to get rows which are having distinct <strong>colB</strong> values.</p>
  
  <p>Any suggestions how i can achieve this?</p>