AnyDAC
ContentsIndexHome
Example 2

See AnyDAC\Samples\Comp Layer\TADQuery\Aggregates sample for details.