SQL문에서 더해서 합을 구하는 함수는 대표적으로 Sum 을 사용합니다.
그러면 곱해서 합을 구하는 함수는?
Ln 함수를 사용해서 계산해야 됩니다.
Log의 성질은 기본수를 얼마나 많이 곱해서 결과값을 수를 만들어 낼수 있는지를 보여줍니다.
How many of one number do we multiply to get another number?
example : How many 2s do we multiply to get 8?
The logarithm tells you what the exponent is!
로그의 정의를 사용해서 곱셈의 합을 구할수 있습니다.
MUL (num) = EXP (SUM (LN (num)))
Not very clear at first, I agree. Lets review the maths behind it:
x = (2 * 3 * 4)
ln(x) = ln(2 * 3 * 4)
ln(x) = ln(2) + ln(3) + ln(4) => SUM(LN(num))
ln(x) = .693 + 1.098 + 1.386
ln(x) = 3.178
x = e (3.178) => EXP(SUM(LN(num)))
x = 24
BOM에서 소요량을 계산하기 위해서는 이 공식을 사용해야 합니다.
참고사이트 : http://blog.daum.net/turnnig-pointer/16498271
참고사이트 : http://viralpatel.net/blogs/row-data-multiplication-in-oracle/