Table Column expression
Your Query Instruction can pull data from Junction summary and timeseries resources through Table Column expressions. Each Table Column expression can select one column (a field) of the table (the Junction resource). You can use multiple Table Column expressions to select multiple columns in the same query.Cross-table query instructions are not supported — you cannot mix Table Column expressions from
different tables in the same query instruction.
Column expressions for Electrocardiogram, Sleep Cycle, and lab testing biomarkers are planned to be introduced in the future.
Summaries
Column Mappings
Map summary resource properties to their Continuous Query column equivalents.Sleep
Activity
Workout
Body
Meal
MenstrualCycle
List columns cannot be selected directly as a table column — aggregate them with a scalar-output subquery. See List-column aggregation for the full syntax.
Profile
Timeseries
Source Column expression
You can use a Source Column expression to refer to Data Source fields common to Junction resources. Note that some Source Column expressions may not be valid in the implicit query context. For example,source_sport is not a valid Source Column
expression in a query that is selecting from the Sleep resource.
If both the Provider and Source Type Source Columns are present in the Group By clause,
the implicit Data Prioritization behavior would be disabled.
Index Column expression
Each Junction resource has a primary datetime index. Your Query Instruction can reference this datetime index using the special Index Column expression:Group Key Column expression
When your Query Instruction uses thegroup_by clause, each expression
in the group_by clause creates a temporary Group Key Column (group_key.$OFFSET). These temporary columns are then used to
facilitate the data grouping and aggregation as specified by your Query Instruction.
You can refer to these columns using the special Group Key Column expression: