Okay, now I have added an attachement of my query.
Debitera=Invoice
Sumofinbe...= How much the customer paid that year.
They aren´t equal but that´s correct.
Anyway, as you can see in the picture there will be two invoices becuase I have two contract.
The old contract was from 2005-2020 and...