public String toSQLString() {
    StringBuilder sqlBuilder = new StringBuilder();
    sqlBuilder.append("GROUP BY TIME").append(' ');
    sqlBuilder.append('(');
    if (startTime != 0 || endTime != 0) {
      if (isLeftCRightO()) {
        sqlBuilder
            .append('[')
            .append(startTime)
            .append(',')
            .append(' ')
            .append(endTime)
            .append(')');
      } else {
        sqlBuilder
            .append('(')
            .append(startTime)
            .append(',')
            .append(' ')
            .append(endTime)
            .append(']');
      }
      sqlBuilder.append(',').append(' ');
    }
    sqlBuilder.append(originalInterval);
    if (!originalSlidingStep.equals(originalInterval)) {
      sqlBuilder.append(',').append(' ');
      sqlBuilder.append(originalSlidingStep);
    }
    sqlBuilder.append(')');
    return sqlBuilder.toString();
  }
This class maintains information of {@code GROUP BY} clause.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/GroupByTimeComponent.java