使用自定义聚集函数,实现聚集乘积: 测试select id,fun_multiply(t.value) "乘积" from (select 3 id , 4 value from dual union select 1 id , 1 value from dual union select 1 id , 0 value from dual union select 2 id , 3 value from dual union select 2 id , 4 value from dual )t group by id;