I am trying to calculate the average using the CE function. My code is as follows
CREATE PROCEDURE VBI_FINAL_LIST (OUT VAR_OUT VBI_RESULT_DUMMY)
READS SQL DATA AS
OUT_ROUND6 = CE_COLUMN_TABLE("MONISSHAA"."VBI_INTERVIEWEE_TEST_DETAILS");
OUT_FINAL_CANDIDATE_LIST = CE_PROJECTION(:OUT_ROUND6, [ID, ROUND_ID], '"ROUND_ID" = ''R6''');
OUT_SCORE_DETAILS = CE_PROJECTION(:OUT_ROUND6,[ID, SCORE]);
OUT_SCORE_SUMMARY = CE_JOIN (:OUT_ROUND6, :OUT_FINAL_CANDIDATE_LIST,[ID], [ID, SCORE]);
VAR_OUT_2 = CE_AGGREGATION (:OUT_SCORE_SUMMARY, [ SUM("SCORE") AS TOTAL_SCORE, COUNT("SCORE") AS COUNT_SCORE], [ID]);
VAR_OUT = CE_PROJECTION(:VAR_OUT_2, [ID, CE_CALC('TOTAL_SCORE/COUNT_SCORE' , INTEGER) AS SCORE ]);
When I call the procedure, I get the following error
error:  failed to save calculation scenario : The following errors occured: Inconsistent calculation model (34011)
- CalculationNode ($$VAR_OUT$$) -> attributes -> calculatedAttribute (SCORE) -> expression: Attribute 'count_score' is missing in node $$VAR_OUT$$.
- CalculationNode ($$VAR_OUT$$) -> attributes -> calculatedAttribute (SCORE) -> expression: Attribute 'total_score' is missing in node $$VAR_OUT$$.
Kindly some one help me to resolve this