How to sum selected row

for example, I have this.
createdAt subTotal
28 June 2021 at 16:42:51 UTC 200
28 June 2021 at 16:42:51 UTC 100
28 June 2021 at 16:42:51 UTC 50
29 June 2021 at 16:42:51 UTC 60
29 June 2021 at 16:42:51 UTC 200

how to get the sum of subtotal in each date and store it in an array? I can’t understand the guide in PHP SDK

If you want to do that with a single query, you will have to use aggregate: PHP Developers Guide | Parse