问题描述
解决方法
下面是2个不同的选项
1)
datatable(firstname:string,lastname:string)
[
"John","Miller","John","Smith","Mike","Stone","Harry","Keller"
]
| summarize properties = make_list(pack("firstname",firstname,"lastname",lastname)) by firstname
firstname properties
--------- ----------
John [{"firstname":"John","lastname":"Miller"},{"firstname":"John","lastname":"Smith"}]
Mike [{"firstname":"Mike","lastname":"Stone"}]
Harry [{"firstname":"Harry","lastname":"Keller"}]
datatable(firstname:string,"Keller"
]
| summarize properties = make_list(strcat(firstname," ",lastname)) by firstname
firstname properties
--------- ----------
John ["John Miller","John Smith"]
Mike ["Mike Stone"]
Harry ["Harry Keller"]