Skip to content

SELECT: MAX

Ali Amirnezhad edited this page Jul 23, 2019 · 2 revisions
const query = myQueryBuilder
    .SELECT({ $MAX: 'field' })
    .from('table')
    .get();

// SELECT MAX(`field`) FROM `table`
const query = myQueryBuilder
    .SELECT({ $MAX: { field: 'fieldMAX' } })
    .from('table')
    .get();

// SELECT MAX(`field`) AS `fieldMAX` FROM `table`
Clone this wiki locally