Sets

There are a couple of basic set operators in EdgeQL: UNION and DISTINCT.

UNION merges two multi-sets together. This may result in duplicate entries:

Input

DISTINCT gets rid of duplicate entries producing a proper set:

Input

Sets cannot be elements of other sets in EdgeQL, so instead the nested syntax is equivalent to a UNION. This is also consistent with the notion that everything is a set, including singleton literal values:

Input
Input