EasyBasic SELECT
Show total sum of all product prices in stock
The query
SQL
SELECT
SUM(price * stock) AS total_inventory_value
FROM products
WHERE is_active = TRUE;Note
“SUM can operate on expressions, not just columns.
SELECT
SUM(price * stock) AS total_inventory_value
FROM products
WHERE is_active = TRUE;Note
“SUM can operate on expressions, not just columns.