When having to check a sum for current post and its siblings it is best to do a sum without the current post and then add its value. This is because the post could have been posted prior or maybe not. The way this code is written you do not have to take that into account which makes it more generic. The result could otherwise change depending on if the post is new or just changed.
int x; x = select sum(field) from table where table.RelationField == this.RelationField && table.RecId != this.RecId; x += this.field;