Instead of SUM() I require MULTIPLY

  • From: Ethan Post <post.ethan@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 9 Dec 2005 16:13:09 -0600

I just came up with a function I would like, but don't think exists.

TABLE TEST (X NUMBER)
=====================
2
2
4

select sum(x) from test;

will return 8...

what I need is

select multiply(x) from test;

will return 16, because 2*2*4 is 16.

Anyone ever seen a SQL aggregate function like this? I don't think it exists
but I hold out hope.

- Ethan

Other related posts: