and only return the result, as an alternative to reading all the records and making
the aggregation yourself. To receive a sum specified for one or more fields in the
table, combine the aggregation with a group by clause. The following
aggregation clauses are available.
Aggregation clause | Description |
sum | Returns the sum of the values in a field. |
avg | Returns the average of the values in a field. |
maxof | Returns the maximum of the values in a field. |
minof | Returns the minimum of the values in a field. |
count | Returns the number of records that satisfy the statement. |
The following illustrates using aggregate functions:
1 | select sum(qty) from inventTrans; |
Best Regards,
Hossein Karimi
*This post is locked for comments