I have been getting myself very confused.
Could somebody kindly explain under what circumstances I would want to use a GROUP BY COALESCE?
My guess is that I would use it if I wanted to conditionally group a set of data by column B (if B was not null) and by column A otherwise. Does that sound right?
TUPLE { a 17 , b 1 }is the same asTUPLE { b 1 , a 17 }, but in SQL the row value constructor(17, 1)is not the same as the row value constructor(1, 17). This is why your "pairs" are not tuples. Because you have omitted a row type constructor I must assume from the context they are(a, b)rather than(b, a)but its inclusion would still not make it a tuple. In contrast,TUPLE { 17 , 1 }is not a valid tuple invocation in Tutorial D, nor isTUPLE { a null , b 1 }. – onedaywhen Dec 15 '11 at 13:23