if (aggregateType == Aggregate.COUNT) { if (readIf("*")) { r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false); } else { if (on instanceof Wildcard && !distinct) { r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false); } else { r = new Aggregate(Aggregate.COUNT, on, currentSelect, distinct); Aggregate agg = new Aggregate(Aggregate.GROUP_CONCAT, readExpression(), currentSelect, distinct); if (readIf("ORDER")) { } else { boolean distinct = readIf("DISTINCT"); r = new Aggregate(aggregateType, readExpression(), currentSelect, distinct);