Get aggregation info for group by queries.
If NULL, aggregation is not allowed.
Overrides QueryPluginBase::getAggregationInfo
public function getAggregationInfo() {
// @todo -- need a way to get database specific and customized aggregation
// functions into here.
return array(
'group' => array(
'title' => t('Group results together'),
'is aggregate' => FALSE,
),
'count' => array(
'title' => t('Count'),
'method' => 'aggregationMethodSimple',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
'count_distinct' => array(
'title' => t('Count DISTINCT'),
'method' => 'aggregationMethodDistinct',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
'sum' => array(
'title' => t('Sum'),
'method' => 'aggregationMethodSimple',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
'avg' => array(
'title' => t('Average'),
'method' => 'aggregationMethodSimple',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
'min' => array(
'title' => t('Minimum'),
'method' => 'aggregationMethodSimple',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
'max' => array(
'title' => t('Maximum'),
'method' => 'aggregationMethodSimple',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
'stddev_pop' => array(
'title' => t('Standard deviation'),
'method' => 'aggregationMethodSimple',
'handler' => array(
'argument' => 'groupby_numeric',
'field' => 'numeric',
'filter' => 'groupby_numeric',
'sort' => 'groupby_numeric',
),
),
);
}