The SET_UNIONS
aggregation function takes a multi-assign attribute and constructs a set that is the union of all of the values from that attribute.
SET_UNIONS
function is:
SET_UNIONS(<multi-assign_attribute>)
where the data type of the attribute must be a set data type (such as mdex:string-set
for a multi-assign string attribute).This function can be used only in SELECT
clauses.
SET_UNIONS example
RETURN results AS SELECT SET_UNIONS(Body) AS bodyUnion FROM WineState GROUP BY WineType ORDER BY WineType
WineType bodyUnion ------------------------------------------- | Bordeaux | { Silky, Tannins } | | Brut | { Robust } | | Chardonnay | { } | | Merlot | { Fruity } | | Pinot Noir | { Supple } | | Red | { Robust, Silky, Tannins } | | White | { Firm, Fresh, Robust } | | Zinfandel | { Robust, Tannins } | -------------------------------------------
|