title: In postgresql, how to use 'where' in Knex.raw as the data to 'where' is coming from a subquery?
body: <p>This is my code
  I want to use regexp_replace so I am trying to use Knex.raw but I am finding it difficult to use where clause</p>
  
  <pre><code>  async function test () {
    let usernameData = {
        oldUserName: 'MobileOpsteam',
        newUserName: 'cool'
    }
    const oldUserNameRegex = `@${usernameData.oldUserName}(?![a-zA-Z0-9])`
  
    const newUserName = `@${usernameData.newUserName}`
  
    let subQuery = await knex.select('id').from('user_notification').where('title', 'like', `%${usernameData.oldUserName}%`)
    let result = await knex.raw((`update user_notification set title = regexp_replace(title, ${oldUserNameRegex}, ${newUserName}, 'g')`).whereIn('id', subQuery))
  // let result = await knex.raw(`update user_notification set title = regexp_replace(title, ${oldUserNameRegex}, ${newUserName}, 'g') where id in ${subQuery}`)
    console.log(result)
  }
  </code></pre>