Is there a quick way to total values in a mySql database table? Say I want to look @ the total inventory of a product category, rather than reading through each item and adding together, is there 1 command?
@chazzyOct 26.2005 — #could you show us some of your table structure? usually you want to select sum(col_name),other_column from table_name group by other_column
replace your count with sum and it's correct. count will give you the number of records matching each product_group. sum(inventory) calculates the total amount in each row of the column inventory matching product_group.