@Ignore
  @Test
  public void groupByWithWildcardTest1() throws SQLException {
    String[] retArray =
        new String[] {
          "1,9,9,8,8,9,9.0,10,10,true,aligned_test10",
          "11,10,10,10,1,1,20.0,20,20,true,aligned_unseq_test13",
          "21,1,0,10,10,0,230000.0,null,30,false,null",
          "31,0,10,0,0,10,null,40,null,null,aligned_test40"
        };
    try (Connection connection = EnvFactory.getEnv().getTableConnection();
        Statement statement = connection.createStatement()) {

      int cnt;
      try (ResultSet resultSet =
          statement.executeQuery(
              "select count(*), last_value(*) from d1 GROUP BY ([1, 41), 10ms)")) {
        cnt = 0;
        while (resultSet.next()) {
          String ans =
              resultSet.getString(TIMESTAMP_STR)
                  + ","
                  + resultSet.getString(count("d1.s1"))
                  + ","
                  + resultSet.getString(count("d1.s2"))
                  + ","
                  + resultSet.getString(count("d1.s3"))
                  + ","
                  + resultSet.getString(count("d1.s4"))
                  + ","
                  + resultSet.getString(count("d1.s5"))
                  + ","
                  + resultSet.getString(lastValue("d1.s1"))
                  + ","
                  + resultSet.getString(lastValue("d1.s2"))
                  + ","
                  + resultSet.getString(lastValue("d1.s3"))
                  + ","
                  + resultSet.getString(lastValue("d1.s4"))
                  + ","
                  + resultSet.getString(lastValue("d1.s5"));
          Assert.assertEquals(retArray[cnt], ans);
          cnt++;
        }
        Assert.assertEquals(retArray.length, cnt);
      }

      try (ResultSet resultSet =
          statement.executeQuery(
              "select count(*), last_value(*) from d1 "
                  + "GROUP BY ([1, 41), 10ms) order by time desc")) {
        cnt = retArray.length;
        while (resultSet.next()) {
          String ans =
              resultSet.getString(TIMESTAMP_STR)
                  + ","
                  + resultSet.getString(count("d1.s1"))
                  + ","
                  + resultSet.getString(count("d1.s2"))
                  + ","
                  + resultSet.getString(count("d1.s3"))
                  + ","
                  + resultSet.getString(count("d1.s4"))
                  + ","
                  + resultSet.getString(count("d1.s5"))
                  + ","
                  + resultSet.getString(lastValue("d1.s1"))
                  + ","
                  + resultSet.getString(lastValue("d1.s2"))
                  + ","
                  + resultSet.getString(lastValue("d1.s3"))
                  + ","
                  + resultSet.getString(lastValue("d1.s4"))
                  + ","
                  + resultSet.getString(lastValue("d1.s5"));
          Assert.assertEquals(retArray[cnt - 1], ans);
          cnt--;
        }
        Assert.assertEquals(0, cnt);
      }
    }
  }
aggregate multi columns of aligned timeseries in one SQL
integration-test/src/test/java/org/apache/iotdb/relational/it/query/view/old/aligned/IoTDBAlignedSeriesQueryTableViewIT.java