RE: Sum entire group listing

2005-11-11 Thread ISC Edwin Cruz
SELECT products.product, products.price, count( log.product ) AS 'Count', ROUND(price*count(log.product), 2) AS 'Total' FROM products LEFT JOIN log ON products.product= log.product GROUP BY product Union SELECT 'Total', '', count( log.product ) AS 'Count', ROUND(price*count(log.product), 2) AS 'T

Re: Sum entire group listing

2005-11-11 Thread Jigal van Hemert
Noel Stratton wrote: more thing that I can not figure out. I would like to sum all calculations created out of the "Total Amount Owed" field that was created. Noel, Take a look at the WITH ROLLUP modifier of GROUP BY [1]. This is available since version 4.1.1. Regards, Jigal. [1] http://d