Documentation Index
Fetch the complete documentation index at: https://vital-mintlify-seo-descriptions-1777051001.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use the WHERE clause to filter summary or timeseries rows before Junction Sense evaluates aggregations or grouping. When a GROUP BY clause is present, the filter runs first so only matching rows contribute to each group. The WHERE clause evaluates SQL-style predicates against the same column expressions that are available in theselect and group_by clauses.
Supported operators
WHERE predicates support these operators:- Comparison:
>,>=,<,<=,=,!= - Logical:
AND,OR,NOT - Parentheses for explicit precedence
- String literals enclosed in single quotes (for example,
'long_sleep')
stage_rem_second) or Source columns (for example, source_type).
Column identifiers follow the Continuous Query column names. See Column Mappings for a full list.
Inside a subquery over a scalar-element list (for example,
List[Utf8] note tags), the reserved identifier element refers to the list element itself — e.g. "element != 'unspecified'". Struct-element list predicates reference the struct field names directly. See List-column aggregation for the full context.Filter rows before grouping
Combine multiple device sources
Filter for specific provider and source type combinations with parentheses to manage precedence.Filter without grouping
You can apply a WHERE clause to ungrouped queries to trim the dataset before computing aggregates.where property.
Evaluation order
- Apply the WHERE predicate to the incoming rows.
- Evaluate the GROUP BY clause (if provided) on the filtered rows.
- Calculate the aggregates in the SELECT clause.