Documentation Index
Fetch the complete documentation index at: https://vital-mintlify-seo-audit-1777989329.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Select a table column
Select a specific table column using a Table Column expression.Output column name
Output column name
The name of the column being selected.
Perform an analysis and select the output value
Perform data analysis with in-built algorithms using value macro expressions:- Sleep Analysis value macro expressions
Output column name
Output column name
The name of the value macro, e.g.,
chronotype for the Chronotype value macro.Aggregate a table column
Aggregate a Table Column expression with respect to thegroup_by clause.
The specified aggregate function is applied to each and every group created by the group_by clause.
The result set is N aggregated values where N is the number of groups.
Statistical functions
Statistical functions
| Aggregate function | Python DSL | JSON DSL |
|---|---|---|
| Minimum | $EXPR.min() | { "func": "min", "arg": $EXPR } |
| Maximum | $EXPR.max() | { "func": "max", "arg": $EXPR } |
| Mean | $EXPR.mean() | { "func": "mean", "arg": $EXPR } |
| Median | $EXPR.median() | { "func": "median", "arg": $EXPR } |
| Standard Deviation | $EXPR.stddev() | { "func": "stddev", "arg": $EXPR } |
| Count | $EXPR.count() | { "func": "count", "arg": $EXPR } |
| Oldest Value | $EXPR.oldest() | { "func": "oldest", "arg": $EXPR } |
| Newest Value | $EXPR.newest() | { "func": "newest", "arg": $EXPR } |
Math functions
Math functions
| Aggregate function | Python DSL | JSON DSL |
|---|---|---|
| Sum | $EXPR.sum() | { "func": "sum", "arg": $EXPR } |
Output column name
Output column name
- the aggregation function name, e.g.,
sum; or - if the Split by Source mode is enabled —
$FUNCTION_NAME.$SOURCE_COLUMN_NAME, e.g.,mean.efficiency.
Aggregate list-column elements
Resources like Menstrual Cycle expose list-of-struct columns (for example,basal_body_temperature is a list of {date, value} entries). Aggregate their elements with a scalar-output subquery — a self-contained select / from (UNNEST) / optional where block that produces one scalar per outer row.
Output column name
Output column name
$FUNC.$COLUMNwhen the subquery aggregates rows directly (e.g.,count.menstrual_flow); or$FUNC.$COLUMN.$FIELDwhen a struct field is extracted (e.g.,mean.basal_body_temperature.value); or$FUNC.$COLUMN.elementwhen the scalar-list element itself is aggregated (e.g.,sum.tags.element).
where predicate, struct-field extraction, and the reserved element identifier for scalar-element lists.
Select the Index Column
Select the primary datetime index of the table using the Index Column expression.Output column name
Output column name
timestamp (constant).Select the Group Key Columns
Select the Group Key Columns associated with thegroup_by clause.
You can select one specific group key column by offset, or select all group key columns with a * wildcard.
Output column name
Output column name
group_key.$OFFSET, where $OFFSET corresponds to the N-th expression of the group_by clause.