StringBuilder sql = new StringBuilder();
if (isAggregate()) {
sql.append(aggregateProjection.getValue())
.append("(").append(columnName).append(")");
} else if (isSubquery()) {
<BUG>sql.append("(").append(criteria.getSQL()).append(")");
</BUG>
} else {
sql.append(columnName);
}

StringBuilder sql = new StringBuilder();
if (isAggregate()) {
sql.append(aggregateProjection.getValue())
.append("(").append(columnName).append(")");
} else if (isSubquery()) {
sql.append("(").append(criteria.toSQL()).append(")");
} else {
sql.append(columnName);
}
