The SINGLETON function takes a single atomic value and returns a set containing only that value.
SINGLETON(<atomic-value>)where atomic-value is an atomic value, such as 50 for an integer set or 'fifty' for a string set. It can also be a single-assign attribute. The resulting set will contain only atomic-value.
SINGLETON(NULL) = { }
SINGLETON(1) = { 1 }
SINGLETON('a') = { 'a' }
RETURN results AS SELECT WineID AS idRec, SINGLETON(WineType) AS singleAttr FROM WineState WHERE WineID BETWEEN 10 AND 14 ORDER BY idRec
idRec singleAttr
----------------------
| 10 | { Bordeaux } |
| 11 | { Zinfandel } |
| 12 | { Red } |
| 13 | { Bordeaux } |
| 14 | { Merlot } |
----------------------