-
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: 'field' })
.from('table')
.get();
// SELECT SUM(`field`) FROM `table`
const query = myQueryBuilder
.SELECT({ $SUM: { field: 'fieldSUM' } })
.from('table')
.get();
// SELECT SUM(`field`) AS `fieldSUM` FROM `table`