Sum - maximiliamus/weby-sloth GitHub Wiki
Calculates the total sum of a numeric column.
$sloth = Sloth::from($data)
->group('foo', 'baz')
->sum();$sloth->print();
foo baz one 6 two 22
print_r($sloth->fetch());
Array
(
[0] => Array
(
[foo] => one
[baz] => 6
)
[1] => Array
(
[foo] => two
[baz] => 22
)
)