COUNT aggregate function with subquery doesn't work

Hello everyone, could someone enlighten me if it is possible to use any aggregation functions within SQL syntax with subquery. Without COUNT function everything works as expected. (Also there is some non-standart behaviour: when instead of COUNT(client) I use just * symbol it returns all documents properties, showed in the second screenshoot).
Here an example:

Error thrown by aforementioned query:

json
{
  "error": {
    "reason": "There was internal problem at backend",
    "details": "class com.alibaba.druid.sql.ast.statement.SQLSubqueryTableSource cannot be cast to class com.alibaba.druid.sql.ast.statement.SQLJoinTableSource (com.alibaba.druid.sql.ast.statement.SQLSubqueryTableSource and com.alibaba.druid.sql.ast.statement.SQLJoinTableSource are in unnamed module of loader java.net.FactoryURLClassLoader @1174aa3)",
    "type": "ClassCastException"
  },
  "status": 503
}

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.