I have a table called payments with information of all payments made by client for the certain period of time like displayed below:
Client_id sum