> # Grand Aggregate Java SequenceIterator Methods

> The Grand Aggregate Java SequenceIterator methods produce a `double` result SequenceIterator the first element of which is the operation result.

> SequenceIterator aggCount() | Returns the count of the number of elements
> SequenceIterator aggMax() | Maximum element value
> SequenceIterator aggMin() | Minimum element value
> SequenceIterator aggSum() | Sum of all elements
> SequenceIterator aggPrd() | Product of all elements
> SequenceIterator aggAvg() | Average of all elements
> SequenceIterator aggVar() | Variance of elements
> SequenceIterator aggVarSamp() | Sample Variance of elements
> SequenceIterator aggDev() | Standard Deviation of elements
> SequenceIterator aggDevSamp() | Sample Standard Deviation of elements
> SequenceIterator aggApproxDC() | Approximate count of distinct values
> SequenceIterator aggApproxHashDC() | Returns a sequence with the approximate count of distinct values for each group for multiple sequences. Whereas `aggApproxDC()` returns the approximate distinct count for each group of a single sequence, a`ggApproxHashDC()` returns the approximate distinct count for multiple sequences
> SequenceIterator aggMinMax() | Maximum and minimum element values

> ## Example

> Following is an example code snippet demonstrating a grand aggregate function:

>         Cursor<Quote> cursor = new Cursor<Quote>(con, Quote.class, "symbol");
>         for (Quote quote : cursor)
>         {
>             SequenceIterator avg = quote.close.aggAvg()
>             Object elem = avg.next();
>             System.out.format("%.3f", elem);
>         }