Sum over attributes per cell


Dear SciDB Gods,

I have an array that has the following schema :

  A:int64 NULL DEFAULT null, 
  B:int64 NULL DEFAULT null, 
  C:int64 NULL DEFAULT null, 
  D:int64 NULL DEFAULT null, 
  E:int64 NULL DEFAULT null, 
  F:int64 NULL DEFAULT null
[id=1:25,1,0, p=1:25000,100,0]

As I understand sum() is over dimensions for same, single attribute. My need is to sum four out of six attributes per cell. So, For each cell, the sum of A + B + C + D only.

Is there a way to sum() over attributes per cell?



Why not simply add 'em up?

apply ( counts, result, A + B + C + D )


SELECT A + B + C + D AS result 
  FROM counts;

Or am I missing something?


Thanks! I believe I was thinking something way too complicated.


That’s something I think whenever I read my old e-mails.