【发布时间】:2021-06-18 21:41:03
【问题描述】:
我在customMetrics 表中有以下数据:
| date | customDimension | Type | value |
| -----------------------------------------------------|
| 01-03-2021 | {"customer":"a"} | Transactions | 12 |
| 01-03-2021 | {"customer":"a"} | Value | 784 |
| 01-03-2021 | {"customer":"c"} | Transactions | 733 |
| 01-03-2021 | {"customer":"b"} | Transactions | 7 |
| 01-03-2021 | {"customer":"c"} | Value | 5 |
| 01-03-2021 | {"customer":"b"} | Value | 85 |
| 01-03-2021 | {"customer":"a"} | Transactions | 50 |
| 01-03-2021 | {"customer":"a"} | Value | 73 |
| 01-03-2021 | {"customer":"c"} | Value | 3 |
| 01-03-2021 | {"customer":"a"} | Transactions | 13 |
| 01-03-2021 | {"customer":"a"} | Value | 237 |
| 01-03-2021 | {"customer":"c"} | Transactions | 3 |
| 01-03-2021 | {"customer":"b"} | Transactions | 575 |
| 01-03-2021 | {"customer":"b"} | Value | 85 |
| 01-03-2021 | {"customer":"b"} | Transactions | 43 |
| 01-03-2021 | {"customer":"b"} | Value | 85 |
| 01-03-2021 | {"customer":"c"} | Value | 789 |
我正在尝试编写一个查询,该查询将为每个客户找到每种类型的每个值的最大值,例如类似:
| date | customer | Type | value |
| ---------------------------------------------|
| 01-03-2021 | a | Transactions | 50 |
| 01-03-2021 | a | Value | 784 |
| 01-03-2021 | b | Transactions | 575 |
| 01-03-2021 | b | Value | 85 |
| 01-03-2021 | c | Transactions | 733 |
| 01-03-2021 | c | Value | 789 |
我很难知道在 kusto 中搜索什么概念来执行此类操作。我可以获得不同的客户列表和不同的类型列表,但我不确定如何将两者结合起来,或者这是否是我应该做的!
任何线索都会有所帮助!
【问题讨论】: