code: private void queryData(DoradusClient client) {
          Command command = Command.builder()
              .withName("Aggregate")
              .withParam("table", "Movies")
              .withParam("metric", "AVERAGE(Budget)")
              .withParam("query", "Leads.LastName=Dunst")
              .build();
          RESTResponse response = client.runCommand(command);
          if (response.isFailed()) {
              throw new RuntimeException("Aggregate query failed: " + response.getBody());
          }
          AggregateResult aggResult = new AggregateResult();
          aggResult.parse(UNode.parseJSON(response.getBody()));
          System.out.println(String.format("Average budget of movies with Kirsten Dunst: $%,.2f",
                                           Double.parseDouble(aggResult.getGlobalValue())));
      }
docs: GET /HelloSpider/Movies/_aggregate?m=AVERAGE(Budget)&q=Leads.LastName=Dunst