title: Knex.js count distinct column with alias
body: <p>I want to generate this SQL code:</p>
  
  <pre><code>Select count(distinct user_id) as ui
  from posts
  </code></pre>
  
  <p>I tried this snippet but it did not work:</p>
  
  <pre><code>knex('posts').countDistinct('user_id').as('ui');
  </code></pre>
  
  <p>How can I do that?</p>