Sorry if the title is not a good description. I am build a spending tracker flask app. I have a database which has the amount I am spending and the type of spending it is. https://i.stack.imgur.com/lAakV.png. I also have a way of adding new spending through my flask app https://i.stack.imgur.com/x0dZf.png. My issue is that I want to be able to access the sum of the spending_amoount in flask and send it to my html page. I left the education_total and transportation_total blank, that blank is where I want to access the sum of their respective spending_amount.