Skip to main content

Analytical Queries - Where Clause

Where clauses are a collection of five-tuples. Each tuple is comprised of a source, subject, predicate, object, and options.

The subject, predicate, and object can all be variables, and a variable needs to be a string that begins with ?. The name of the variable does not matter.

If two or more tuples have the same variable, then the value of the variable is limited to values that validate all of the tuples in which that variable can be found.

ValueDescription
sourceOptional source. $fdb is the current Fluree, $fdb3 is the ledger, as of block 3, and $wd is Wikidata.
subjectReference to a subject. Can be a subject id, unique two-tuple, variable (a string that begins with ?), or null.
predicateReference to a predicate. Can be either a subject id, predicate name, variable (a string that begins with ?).
objectReference to an object. Can be a value, subject id, unique two-tuple, variable (a string that begins with ?), or null.