-
Notifications
You must be signed in to change notification settings - Fork 0
SELECT: SUM
Ali Amirnezhad edited this page Jul 23, 2019
·
2 revisions
const query = myQueryBuilder
.SELECT({ $SUM: 'price' })
.from('users')
.get();
// SELECT SUM(`price`) FROM `users`
const query = myQueryBuilder
.SELECT({ $SUM: { price: 'priceSUM' } })
.from('users')
.get();
// SELECT SUM(`price`) AS `priceSUM` FROM `users`