For example I have a table like this:
product | quantity | something ------------------------------- abc | 5 | 2 xzy | 5 | 2 asd
You can use rollup to generate totals, but you have to change it to an aggregate function, like this:
SELECT product, sum(quantity), sum(something) FROM tableName GROUP BY product WITH ROLLUP