How to filter the customer's first sales invoice in Cust.Ledger Entry

Hi EveryBody.

I am making a report to filter customers with the first and last sales day arising from date to date and calculating the total number of sales invoices.

Please help me. How to filter the customer’s first sales invoice in Cust Ledger Entries and the total number of invoices up to the last day of the customer’s sales amount.

Customer Code The first Sales Invoice date Date of the first Sales Invoice Amount Date of the Last Sales Invoice The total number of accumulated invoices Total Amount Sales Invoice
0001 01/01/2019 1500 20/02/2020 100 250000

The total number of accumulated invoices: Document No (Sales Invoice) count from the first to last day (To Date)

Total Amount Sales Invoice: Total Amount from the first to last day

Please help me with the solution.

Thanks so much

You will be doing filtration on cust. Ledger entry table. Its all filtration game and shouldn’t be difficult what you’re trying to achieve. Are you learning development?