The INTERSECTION row function takes two sets of the same data type and returns a set that is the intersection of both input sets.
INTERSECTION(<set1>, <set2>)where:
The function "INTERSECTION" is defined for the argument type(s) mdex:string-set, mdex:double-set
In this error case, INTERSECTION was used with a multi-assign string attribute (mdex:string-set) and a multi-assign double attribute (mdex:double-set) as inputs.
RETURN results AS SELECT WineID AS idRec, INTERSECTION(Body, Flavors) AS intersectAttrs FROM WineState WHERE WineID BETWEEN 5 AND 9 ORDER BY idRec
idRec intersectAttrs ----------------------------- | 5 | { Earthy } | | 6 | { } | | 7 | { } | | 8 | { Oak } | | 9 | { Fruit, Strawberry } | -----------------------------
Records 5 and 8 have one-element result sets because there is one intersection between their Body and Flavors assignments, while Record 9 has a two-element intersection. Records 6 and 7 return empty sets because there is no intersection among their Body and Flavors assignments.