Instead of fetching all transactions client has made in a month from DB, parsing their entities, and then iterating over all of them and adding their amounts together: simply SELECT SUM(amount) and let DB do its thing.
Instead of fetching all transactions client has made in a month from DB, parsing their entities, and then iterating over all of them and adding their amounts together: simply `SELECT SUM(amount)` and let DB do its thing.
Instead of fetching all transactions client has made in a month from DB, parsing their entities, and then iterating over all of them and adding their amounts together: simply
SELECT SUM(amount)
and let DB do its thing.