Re: TopN on two metrics

2018-10-11 Thread Charles Allen
yes, you are correct On Thu, Oct 11, 2018 at 6:24 AM Abhishek Kaushik wrote: > So, something like this should work then: > > "aggregations":[ > { > "fieldName":"metric1", > "name":"metric1", > "type":"longSum" > }, > { >

Re: TopN on two metrics

2018-10-11 Thread Abhishek Kaushik
So, something like this should work then: "aggregations":[ { "fieldName":"metric1", "name":"metric1", "type":"longSum" }, { "fieldName":"metric2", "name":"metric2", "type":"longSum" } ], "postAggregations":[

Re: TopN on two metrics

2018-10-11 Thread Charles Allen
For the vast majority of use cases, Yes! For example, lets say you have two metrics "Cost" and "Taxes" as USD cents. When you add the two together you get the total that was charged (or something similar). To get the total that was charged across everything, you simply sum the Cost and sum the

TopN on two metrics

2018-10-11 Thread Abhishek Kaushik
Hi, Suppose I have two metrics A and B in my dataset. I need to have a TopN query on the aggregated combination of both (here A+B). Is it possible in druid?