Bug #18348 AGGREGATE BY clause as alternative to GROUP BY
Submitted: 20 Mar 2006 6:36 Modified: 23 Mar 2006 17:07
Reporter: Robin Edwards Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[20 Mar 2006 6:36] Robin Edwards
Description:
It'd be nice to have an AGGREGATE BY clause (or similar) that allows you to list the summary fields instead of all the fields you want to group by.

So instead of :

SELECT field1, field2, field3, field4 ... SUM(field5) as total FROM tablename 
GROUP BY field1, field2, field3, field4 ...

I could write:

SELECT field1, field2, field3, field4 ... SUM(field5) as total FROM tablename 
AGGREGATE BY total

How to repeat:
N/A
[23 Mar 2006 17:07] Valeriy Kravchuk
Thank you for the feature request, but I do not think it will be implemented anytime soon. Not before it will be included into the SQL standard, at least.