Lets say I have table with 1 column like this:
Col A
1
2
3
4
If I SUM it, then I will get this:
Col A
10
This is a complicated matter. If you want to take signs and handle zero, the expression is a bit complicated:
select (case when sum(case when a = 0 then 1 else 0 end) > 0
then 0
else exp(sum(log(abs(a)))) *
(case when sum(case when a < 0 then 1 else 0 end) % 2 = 1 then -1 else 1 end)
end) as ProductA
from table t;
Note: you do not specify a database. In some databases you would use LN() rather than LOG(). Also the function for the modulo operator (to handle negative values) also differs by database.