You don't need any of that.
Just query your AN for EQUNR And VALUE with SUM aggregation on the VALUE measure.
SELECT EQUNR, SUM(VALUE) FROM "_SYS_BIC"."yourpkg/yourAN" GROUP BY EQUNR
You don't need any of that.
Just query your AN for EQUNR And VALUE with SUM aggregation on the VALUE measure.
SELECT EQUNR, SUM(VALUE) FROM "_SYS_BIC"."yourpkg/yourAN" GROUP BY EQUNR