Hi guys: As all know, TOP_N expression can be used in the following scenario:
Select dim_a, sum(metric_a) sum_metric_a from table group by dim_a order by sum_metric_a desc limit 100 However, can we sort one metric but aggregate other metrics at the same time, like the following scenario: Select dim_a, sum(metric_a) sum_metric_a, sum(metric_b) sum_metric_b, sum(metric_c) sum_metric_c from table group by dim_a order by sum_metric_a desc limit 100 Of course it can be done by just using the normal expression and sort it online during query process, but can it be done as a pre-calculation, just like the TOP_N? Hope this makes sense. Thanks guys! Best, Feng 发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
