Is there any way to get total price of all products by category and total price of all products in a single query.
Below is query i am using giving price by category.
SELECT SUM(price) as totalprice
FROM products
Group BY category_id
See Question&Answers more detail:os