private void generateMergeContext(final MergeContext mergeContext) { mergeContext .getAggregationColumns() .add( new AggregationColumn( "COUNT(id)", AggregationType.COUNT, Optional.of("c"), Optional.<String>absent())); mergeContext.getOrderByColumns().add(new OrderByColumn("id", "a", OrderByType.DESC)); mergeContext.getGroupByColumns().add(new GroupByColumn("id", "d", OrderByType.ASC)); mergeContext.setLimit(new Limit(0, 10)); }