Closed xitology closed 8 months ago
undefine()
group_with()
undefine(name)
attach_earliest()
attach_latest()
filter_with()
@funsql begin person() attach_earliest( earliest_bmi => measurement(LOINC("39156-5", "Body mass index (BMI) [Ratio]"))) attach_latest( latest_bmi => measurement(LOINC("39156-5", "Body mass index (BMI) [Ratio]"))) select( person_id, earliest_bmi_datetime => earliest_bmi.datetime, earliest_bmi_value => earliest_bmi.value_as_number, latest_bmi_datetime => latest_bmi.datetime, latest_bmi_value => latest_bmi.value_as_number) end
Just like group_with() and filter_with(), they also accept an optional predicate parameter.
predicate
undefine()
: preserve group type in order not to block aggregatesgroup_with()
: add trailingundefine(name)
to prohibit direct access to the attached rowattach_earliest()
andattach_latest()
, similar tofilter_with()
andgroup_with()
Just like
group_with()
andfilter_with()
, they also accept an optionalpredicate
parameter.