Function to create a total column read from the database

Hi,
through the tables connect the database where inside there is a column with a value that I would like to totalize at the end of the table display.
Is it possible to have a sum function in the tables?
If it is not possible what kind of code do you have to write? (I attach photos)
Thank you.