distinct operator
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Produces a table with the distinct combination of the provided columns of the input table.
T | distinct
ColumnName[,
ColumnName2, ...]
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
ColumnName | string |
✔️ | The column name to search for distinct values. |
Note
The distinct
operator supports providing an asterisk *
as the group key to denote all columns, which is helpful for wide tables.
Shows distinct combination of states and type of events that led to over 45 direct injuries.
StormEvents
| where InjuriesDirect > 45
| distinct State, EventType
Output
State | EventType |
---|---|
TEXAS | Winter Weather |
KANSAS | Tornado |
MISSOURI | Excessive Heat |
OKLAHOMA | Thunderstorm Wind |
OKLAHOMA | Excessive Heat |
ALABAMA | Tornado |
ALABAMA | Heat |
TENNESSEE | Heat |
CALIFORNIA | Wildfire |
If the group by keys are of high cardinalities, try summarize by ...
with the shuffle strategy.