Nested GroupBy On HyperUnique Field will work or not

in my druid model data is in the following format:

{

“name”: “clicked_home”

user_id:“hyperunique_field”

}

i want to get the result like:

number of users who clicked “clicked_home” n times

Ex:

number of users who clicked “clicked_home” 2 times are 50,

number of users who clicked “clicked_home” 5 times are 500

i wrote nested GroupBy query likethis:

{

“queryType”:“groupBy”,

“dataSource”: {

“type”:“query”,

“query”:{

“queryType”: “groupBy”,

“dataSource”:“sample-data-store”,

“granularity”: “all”,

“dimensions”: [“userIdHll”],

“filter”: {

“type”: “and”,

“fields”: [

{ “type”: “selector”, “dimension”: “name”, “value”: “clicked_home” }

]

},

“aggregations”: [

{ “type”: “count”, “name”: “count” }

],

“intervals”: [ “2017-12-27/2017-12-28” ]

}

},

“granularity”: “all”,

“dimensions”: null,

“aggregations”: [

{ “type”: “count”, “name”: “count” }

],

“intervals”: [ “2017-12-27/2017-12-28” ]

}

but iam getting the result like this:

[

{

“version”: “v1”,

“timestamp”: “2017-12-27T00:00:00.000Z”,

“event”: {

“count”: 1

}

}

]

what is my mistake…?, any help …?

Your data model will only give you the number of unique users that clicked_home. Your desired report requires you to track the behaviour of each user separately, something like this:

name: dimension

user_id: dimension

count: count aggregation