title: How to write mysql subquery in Knex?
body: <p>I am trying to write mysql subquery sql in knex but the results of query are undesired.</p>
  
  <p>This is my MySQL query:</p>
  
  <pre><code>    select *
      from istifta
      where istifta_id not in (
      select istifta_id
      from status
      where status = 'divided'
      )
  </code></pre>
  
  <p>This is my query converted to Knex:</p>
  
  <pre><code>    subquery = await ctx.knex
        .select('istifta_id')
        .from('status')
        .where('status', 'divided')
  
      result = await ctx.knex
      .select()
      .from('istifta')
      .where('istifta_id', 'not in', subquery)
  </code></pre>
  
  <p>MySQL query is returning two rows all of which doesn't have <code>status = 'divided'</code>
  While Knex is returning three rows with a row having <code>status = 'divided'</code></p>