knex count case when code example
Example: knex.js count
knex('users').count('active', {as: 'a'})Outputs:select count(`active`) as `a` from `users`
knex('users').count('active', {as: 'a'})Outputs:select count(`active`) as `a` from `users`