WHERE keeps the rows in the data stream that meet the conditions, and discards those that do not meet the conditions.
Syntax 1: WHERE <condition>
Syntax 2: WHERE <query> (Under development)
Input
NOTEThe statement right following WHERE clause should call the alias (or its homologous alias) that enters WHERE clause, otherwise this statement will not be valid.
For instance, compare n1 and n2 that are heterologous, return them if they have the same color:

UQLfind().nodes({shape == "square"}) as n1 find().nodes({shape == "round"}) as n2 where n1.color == n2.color return n1, n2
<condition>Sample graph: (to be used for the following examples)

Example: Find 1-step paths @course-@student, if the credit of course is 4, or the age of student is 24, then return the path
UQLn({@course} as a).e().n({@student} as b) as p where a.credit == 4 || b.age == 24 return p{*}
ResultFrench <---- Jason French <---- Lina French <---- Eric Math <---- Pepe Math <---- Eric
<query> (Under Development)Example: find an intermediate card with alias 'agent' that satisfies conditions as shown in the image below: Card CA002 transfers money to Card CA001 via agent; agent is a neighbor to Card CA003 within 2 hops

UQLn({_id == "CA002"}).re().n({@card} as agent).re().n({_id == "CA001"}) where n(agent).e()[*:2].n({_id == "CA003"}) return agent{*}
Analysis: WHERE further filters data columns "agent": it judges if the shortest paths from "agent" to Card CA003 exist, if true, then it passes "agent" to later "return"
The example above can be put in a subgraph template as shown below:
UQLsubgraph([ n({_id == "CA002"}).re().n({@card} as agent).re().n({_id == "CA001"}), n(agent).e()[*:2].n({_id == "CA003"}) ]) return agent{*}