I have a route called '/test_cancellation', which is returning all the cancellations by account_mananger, fronter, closer, management_fee, cancellation date. I want to create a route that return the total of management_fee (sum) by year or month.
This is the route that I have right now:
And, this is the json that is returning:
I want to created a route that use the cancellation_date as parameter to return only the year with total of management_fee (Sum). Like this: