How do I create the grouping shown below in the query (not using the UI).
Below are 2 different options
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, lastname:string)
[
"John", "Miller",
"John", "Smith",
"Mike", "Stone",
"Harry", "Keller"
]
| summarize properties = make_list(strcat(firstname, " ", lastname)) by firstname
firstname properties
--------- ----------
John ["John Miller","John Smith"]
Mike ["Mike Stone"]
Harry ["Harry Keller"]