I am trying to get the sum of a column but it's not working properly. it returns an array of rows rather than a single value. My code looks like this:
pendings.find()
.select(function (column) {
return column('amount')
.sum();
})
.all()
.then(function (models) {}):