Number of uniques for another column's quantile

I have a two columns, one is number of unique users and the other is number of hours.

I have setup quantilesDoublesSketch on the hours during ingestion like below:

{

“type”: “quantilesDoublesSketch”,

“name”: “hours_hist_sketch”,

“fieldName”: “hours”,

“k”: 256

}

``

And the unique users hyperUnique column setup like below during ingestion:

{

“type”: “hyperUnique”,

“name”: “unique_users”,

“fieldName”: “user_id”

}

``

I am trying to get distinct count of the users based on the 33% and 66% quantile breaks. How do i go about coding the json query?

I have come up with the following, but it does not seem to be giving expected output…

{

“queryType”: “groupBy”,

“dataSource”: “users”,

“granularity”: “all”,

“aggregations”: [{

“type”: “quantilesDoublesSketch”,

“name”: “hours_sketch”,

“fieldName”: “hours_hist_sketch”,

“k”: “256”

},

{

“type”: “hyperUnique”,

“name”: “unique_users”,

“fieldName”: “unique_users”,

“isInputHyperUnique”: true,

“round”: false

}

],

“postAggregations”: [{

“type”: “quantilesDoublesSketchToQuantiles”,

“name”: “quantiles”,

“field”: {

“type”: “fieldAccess”,

“fieldName”: “hours_sketch”

},

“fractions”: [0.33, 0.66]

}]

}

``

So, basically i want to group the number of unique users by the hours quantiles.
I am expecting the below output:

Hours Quantile Unique Users

Below 33% 1234

Between 33% and 66% 2345

Between 66% and 100% 5678