How do i get an aggregate product?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I obtain an aggregate product of several records in a query? Its
very easy to get an aggregate sum, but products have stumped me. Can I do it
using SQL?
 
Yes, it can be done. Basically add the logs of the numbers and then convert the
logs back into a number

MyProduct: Exp(SUM(Log(SomeNumberField)))

This can fail if your numbers get too big. Your maximum value is the size of a double.
 
Back
Top