How can I calculate my database data.

I’m still a beginner in code, so I don’t know much about it.