Friday, February 24, 2012

group by all except one

Hello,
i want to ask whether exist some possibility to make sql query grouping all fields except one field. Because is annoying when you must make select something like:

SELECT a,b,c,d,e,count(f) FROM x GROUP BY a,b,c,d,e

when easiest way is something like.

SELECT a,b,c,d,e,count(f) from x GROUP BY ALL except f.

Is something like 'except' operator possible? and in other databases?

Thank youNo.

No comments:

Post a Comment