Using the EntityQuery API I am trying to add a group by clause to the query, however, it doesn't seem that one exists. The EntityQuery API does not have a groupBy() method.
Current Code:
$nodes = Drupal::entityQuery('node')
->condition('type', 'thing')
->condition('field_num_1', 'value', '=')
->condition('field_num_2', 'value', '=')
->range(0, 10)
->sort('title', 'ASC')
->execute();
Ideal Code:
$nodes = Drupal::entityQuery('node')
->condition('type', 'thing')
->condition('field_num_1', 'value', '=')
->condition('field_num_2', 'value', '=')
->groupBy('field_num_3')
->range(0, 10)
->sort('title', 'ASC')
->execute();