Zen Cart Logo
Forums / Features Wish List / Total cost of inventory in store

Total cost of inventory in store

Views: 27

Results 1 to 1 of 1
15 Feb 2012, 7:01 PM
#1
one_tall_man avatar

one_tall_man

Zen Follower

Join Date:
Feb 2009
Posts:
125
Plugin Contributions:
0

Total cost of inventory in store

Was fiddling with SQL and came up with this quick query to output total cost of all products in the store:

SELECT
/*pd.products_name,
p.products_price,
p.products_quantity,*/
SUM(p.products_quantity * p.products_price) products_cost
/*p.products_quantity * p.products_price products_cost*/
FROM vintageelectronics_products_description pd
INNER JOIN vintageelectronics_products p
ON pd.products_id = p.products_id;

Commented out lines display cost of each product instead of one grand total.
If anyone can give me a quick overview on how to create a report, I'll try to create a similar report by category with grand total at the bottom.