Dynamically execute a string as query
The below query will create a string that represents an executable query. I want the ability to then execute that string. This way I can dynamically generate a query based on an existing Schema.
| where ColumnName endswith '_duration'
| summarize Columns = make_list(ColumnName)
// Make the query
| project strcat('SomeTable | summarize avg(', array_strcat(Columns, '), avg('), ') by Day = startofday(Event_ReceivedTime)')
Closing this as completed, this already exist: