I am trying to implement a function which essentially computes different aggregated values and inserts these values as a row in a new table.
Something like this: