title: Realm React Native - does SORT DISTINCT actually work?
body: <p>The <a href="https://realm.io/docs/javascript/latest#filtering" rel="noreferrer">Realm JavaScript documentation</a> says:</p>
  
  <p>Sorting and find distinct values are possible with functions SORT and DISTINCT, e.g. age > 20 <code>SORT(name ASC, age DESC) DISTINCT(name)</code>.</p>
  
  <ul>
  <li>The ordering for sorting can be one of the following case insensitive literals: ASC, ASCENDING, DESC, DESCENDING.</li>
  <li>Any number of properties can appear inside the brackets in a comma separated list.</li>
  <li>Any number of sort/distinct conditions can be indicated, they will be applied in the specified order.</li>
  <li>Sort or distinct cannot operate independently, these conditions must be attached to at least one query filter.</li>
  </ul>
  
  <p>I'm trying to use it like this:</p>
  
  <pre><code>realm
    .objects&lt;CardFace&gt;(CardFaceSchema)
    .filtered(`SORT(name ASC, expansion.releaseDate DESC) DISTINCT(name)`)
  </code></pre>
  
  <p>And get the red screen of death with the following message: <code>SORT(name ASC, expansion.releaseDate DESC) DISTINCT(name):1:4(4): Invalid predicate.</code></p>
  
  <p>What am I doing wrong? My realm version is 2.3.3</p>