grouping by expressions

(This email discharges my ACTION-303, .)

When we last discussed grouping by expressions 
we resolved that:

RESOLVED: query results can be grouped by expressions, and those 
expressions can be aliased to a variable which can then be projected -- 
the mechanism & syntax for defining these aliases remains to be determined

We left the mechanism undecided because we noted that the BIND operator 
(which had not yet been decided) might make for a simple way to 
accomplish this, without adding aliasing (AS) into the GROUP BY 
expression itself:

SELECT ?foo ...
    BIND (...expr... AS ?foo)
} GROUP BY ?foo

Given that we have since resolved to include BIND as above, I'd like to 
revisit the grouping-expression projection issue, as per ACTION-303.

I believe there are likely three options:

1) To project grouping expressions, use BIND to alias the expression to 
a variable and then GROUP BY and project that variable (as above).

2) Include an AS aliasing mechanism in GROUP BY, allow that alias to be 
projected in the SELECT clause

3) Allow SELECT list aliases to be used in the GROUP BY expression

Can people please indicate on the mailing list which direction they'd 
like us to go on this, and we will then wrap this up on next Tuesday's 


Received on Tuesday, 2 November 2010 21:07:13 UTC