protected override void BuildGroupBy(SelectQuery query, ReportColumnMapping groupByColumn, MappedSearchRequest request)
        {
            var actionSpecIdColumn = QueryHelpers.GetColumnMapping(_transposeKeyColumnId);

            query.GroupBy(_transposeStatsTableAlias, groupByColumn.FieldName)
            .GroupBy(_transposeStatsTableAlias, actionSpecIdColumn.FieldName);

            StatsQueryHelpers.AddTemporalAggregationGroupBy(query, request.TemporalAggregation, _constants.StatsDateDbField);
        }
        protected override void BuildWhere(SelectQuery query, string queryText, List <MappedSearchRequestFilter> filters, MappedSearchRequest request)
        {
            var allTransposeStatsColumns   = _dataSourceComponents.StatsQueryBuilder.GetAllTransposeStatsColumns(request);
            var transposeKeyColumn         = QueryHelpers.GetColumnMapping(_transposeKeyColumnId);
            var selectedTransposeKeyValues = allTransposeStatsColumns.Select(x => x.ActionSpecId).Distinct().Select(x => x.ToString()).ToList();

            query.WhereColumnIn(_transposeStatsTableAlias, transposeKeyColumn.FieldName, selectedTransposeKeyValues, DbType.Int32, _transposeStatsKeyFieldAlias);

            StatsQueryHelpers.AddDateFilters(query, _transposeStatsTableAlias, request.TemporalAggregation, request.DateRangeType, _constants.StatsDateDbField, request.DateStart, request.DateEnd);
        }
 protected override void AddTemporalAggregationGroupBy(SelectQuery query, TemporalAggregation temporalAggregation)
 {
     StatsQueryHelpers.AddTemporalAggregationGroupBy(query, temporalAggregation, _constants.StatsDateDbField);
 }
 protected override void BuildWhere(SelectQuery query, string queryText, List <MappedSearchRequestFilter> filters, MappedSearchRequest request)
 {
     StatsQueryHelpers.AddDateFilters(query, _statsTableAlias, request.TemporalAggregation, request.DateRangeType, _constants.StatsDateDbField, request.DateStart, request.DateEnd);
 }