Aggregate or extract dimensions not in GroupBy

I’m trying to aggregate or extract dimensions that I do not want to group by.

Example dataset:


How can I get the following result with Druid?

“name”: "Jason,
“class”: “A, B”,
“score”: 150
“name”: “Druid”,
“class”: “B”,
“score”: 90

I have tried groupBy queries with aggregations but they only work on numerical values.

I’ve also tried DimensionSpec with groupBy, but it’s not what I want, as dimensions after extracting are still used for grouping.

Are there any other possible options?

Hi Jason,

You might have come across this already, but seems like there was another thread on a similar topic today, hopefully this is helpful:

  • Jon