I have a table with company_name and RegistrationId column.
How to write a query so that I can do group by company_name but concatenate all values of RegistrationId into a string column (say AllIDs) with comma like 123,456,789?
I have a table with company_name and RegistrationId column.
How to write a query so that I can do group by company_name but concatenate all values of RegistrationId into a string column (say AllIDs) with comma like 123,456,789?
This can be expressed as:
T | summarize AllIds=make_list(RegistrationId) by company_name
You can use make_set() function to create unique set (without repetitions of ids).
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/makelist-aggfunction https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/makeset-aggfunction
If you need later to format a string from array - use strcat_array() function:
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/strcat-arrayfunction