Training
Module
Write multi-table queries by using Kusto Query Language - Training
Learn how to write Kusto Query Language (KQL) queries to combine and retrieve data from two or more tables by using the `lookup`, `join`, and `union` operators.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Table.Max(table as table, comparisonCriteria as any, optional default as any) as any
Returns the largest row in the table
, given the comparisonCriteria
. If the table is empty, the optional default
value is returned.
Find the row with the largest value in column [a] in the table ({[a = 2, b = 4], [a = 6, b = 8]})
.
Usage
Table.Max(
Table.FromRecords({
[a = 2, b = 4],
[a = 6, b = 8]
}),
"a"
)
Output
[a = 6, b = 8]
Find the row with the largest value in column [a] in the table ({})
. Return -1 if empty.
Usage
Table.Max(#table({"a"}, {}), "a", -1)
Output
-1
Training
Module
Write multi-table queries by using Kusto Query Language - Training
Learn how to write Kusto Query Language (KQL) queries to combine and retrieve data from two or more tables by using the `lookup`, `join`, and `union` operators.