From 7ef56b2914f35f7e236a44d825ff95ddd82310ad Mon Sep 17 00:00:00 2001 From: Michael Brichko Date: Sun, 19 Jul 2026 10:13:12 +0300 Subject: [PATCH] minor fix --- data-explorer/kusto/query/graph-query-language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-explorer/kusto/query/graph-query-language.md b/data-explorer/kusto/query/graph-query-language.md index 962b987176..b6655c3948 100644 --- a/data-explorer/kusto/query/graph-query-language.md +++ b/data-explorer/kusto/query/graph-query-language.md @@ -43,7 +43,7 @@ LIMIT 1 Reading the query clause by clause: - `MATCH (p:Person)-[:ACTED_IN]->(m:Movie)` describes the pattern to find: a node with the `Person` label bound to the variable `p`, connected by an edge with the `ACTED_IN` label, to a node with the `Movie` label bound to the variable `m`. Labels (`:Person`, `:ACTED_IN`, `:Movie`) restrict which entities match, and the variables (`p`, `m`) let you refer to the matched entities in later clauses. The arrow `->` sets the direction, from actor to movie. Every query must begin with `MATCH`. -- `WHERE` m.Year >= 1990 AND (p.Name STARTS WITH 'T' OR p.Name STARTS WITH 'K') filters the matched rows by a predicate before they're returned, here keeping only movies released in 1990 or later whose actor's name starts with `T` or `K`. `STARTS WITH` is a string predicate; you can also match the end of a value with `ENDS WITH`, or find a substring anywhere in the value with `CONTAINS`. +- `WHERE` m.Year >= 1990 AND p.Name STARTS WITH 'T' filters the matched rows by a predicate before they're returned, here keeping only movies released in 1990 or later whose actor's name starts with `T`. `STARTS WITH` is a string predicate; you can also match the end of a value with `ENDS WITH`, or find a substring anywhere in the value with `CONTAINS`. - `RETURN p.Name AS actor, COUNT(m) AS movieCount` projects the output columns and renames them with `AS`. It includes an aggregation, `COUNT(m)`, which groups by the other returned column (`p.Name`) and produces one row per actor with the number of matching movies. - `NEXT` pipes the result of the preceding segment into a new query segment, so you can keep processing the rows you just produced, including the `movieCount` aggregate. - `FILTER movieCount > 1` keeps only the rows that satisfy a predicate. `FILTER` is the same as `WHERE` but acts as a standalone statement while `WHERE` comes with `MATCH`. `WHERE` is more performant as it allows to eliminate redundant data earlier in the query.