[Please Help] How to show each member the total spent on his purchases

Hi everyone. I am looking for a solution to show every logged user, therefore on a “member” page, the total amount of his purchases. For example, if the user in question has made a total of 3 orders, relatively of € 20, € 50 and € 80 I should show a text that reports the total of € 150, visible only to him on his page. Furthermore, in addition to the total amount, I should show other information always calculated based on the amount spent. For example, every € 100 spent I have to show 1 point.
Should I make a query on the “orders” table? Or do I have to create a new database table where to report this information after each new order entry?
Please advise me the best solution, if possible with practical examples. Thank you

please can someone help me?