@Test
  public void groupByLevelWithAliasWithTimeIntervalTest() throws Exception {
    String[] retArray = new String[] {"0,0", "100,0", "200,2", "300,1", "400,0", "500,0"};
    String[] retArray2 = new String[] {"0,0", "100,1", "200,2", "300,0", "400,0", "500,0"};
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {

      int cnt = 0;
      try (ResultSet resultSet =
          statement.executeQuery(
              "select count(temperature) as ct from root.sg1.d1, root.sg1.d2 GROUP BY ([0, 600), 100ms), level=1")) {
        while (resultSet.next()) {
          String ans =
              resultSet.getString(ColumnHeaderConstant.TIME) + "," + resultSet.getString("ct");
          Assert.assertEquals(retArray[cnt], ans);
          cnt++;
        }
      }

      cnt = 0;
      try (ResultSet resultSet =
          statement.executeQuery(
              "select count(temperature) as ct from root.sg1.* GROUP BY ([0, 600), 100ms), level=1")) {
        while (resultSet.next()) {
          String ans =
              resultSet.getString(ColumnHeaderConstant.TIME) + "," + resultSet.getString("ct");
          Assert.assertEquals(retArray[cnt], ans);
          cnt++;
        }
      }

      cnt = 0;
      // root.sg1.d1.* -> [root.sg1.d1.status, root.sg1.d1.temperature] -> root.*.*.* -> ct
      try (ResultSet resultSet =
          statement.executeQuery(
              "select count(*) as ct from root.sg1.d1 GROUP BY ([0, 600), 100ms), level=1")) {
        while (resultSet.next()) {
          String ans =
              resultSet.getString(ColumnHeaderConstant.TIME) + "," + resultSet.getString("ct");
          Assert.assertEquals(retArray2[cnt], ans);
          cnt++;
        }
      }
    }
  }
One Result Column with more than one alias.
integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBAggregationByLevelIT.java