Reducing with 0 when value is not there
question for the non-existent values:
when we sum over an attribute, say payment and for some records that this value is non-existent (which i believe typedb doesn't create any instance of that attribute for that particular entity?), how can i set 0 for those cases in my sum? I don't care about my entity just in my sum i want to replace n/e with 0.
here is a query, where $pa could be non-existent for some records:
(originally from @Reza )
when we sum over an attribute, say payment and for some records that this value is non-existent (which i believe typedb doesn't create any instance of that attribute for that particular entity?), how can i set 0 for those cases in my sum? I don't care about my entity just in my sum i want to replace n/e with 0.
here is a query, where $pa could be non-existent for some records:
(originally from @Reza )
