@Test
  public void descAggregationWithUnseqData() {
    String[] retArray =
        new String[] {
          "12",
        };
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {

      int cnt = 0;
      try (ResultSet resultSet =
          statement.executeQuery("SELECT max_time(s1) FROM root.sg.d1 where time < 15")) {
        while (resultSet.next()) {
          String ans = resultSet.getString(maxTime("root.sg.d1.s1"));
          Assert.assertEquals(retArray[cnt], ans);
          cnt++;
        }
        Assert.assertEquals(1, cnt);
      }
    } catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
  }
test aggregation query with more than one functions on one series
integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBAggregationIT.java