I ahve a db question where I select like:

"SELECT a,b, c, d, e, f, SUM(f) AS sum_f FROM

whatever, whatever, LEFT OUTER JOIN etc etc

GROUP BY a, b, c, d,e,f WITH ROLLUP

Is this statement correct?

Because when I run the query without GROUP BY and rollup I get the column f (it's a quantity) like


a f
--------

car 4
bike 2
car 1
plane 1
rocket 2

But when I use group by and with rollup the f column stays the same the whole time... there must be something wrong with my query

What I basically want to do is to group the resultset by a and sum it by f per group (and a grand total at the bottom)

kind regards
Henrik







car