... detail). I mean sum the values in the table of movements, for each product, and then upgrade to the "catalog" table this values that correspond to each specific product, and at same time, update the group and sub-group to which they relate, in only one query. (all in one stroke) Thus, ...