fahad19 / fahad19/firenze

sum() column function not working properly

Open
#50 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
128
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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:

```js
pendings.find()
.select(function (column) {
return column('amount')
.sum();
})
.all()
.then(function (models) {}):
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.