Create SQL for aging debtors report

Job ID: 32857506

Budget: $10 – $30 AUD

I have MySQL database with following table structure
Id, AccountId - TransactionDate - Fees - FeesRelief - Debit , Credit
1 - XYZ - 10-01-2022 - 25.00 - 0.00 - 0 0
2 - XYZ 20-01-2022 - 0.00 0.00 - 0 100 //payment
3 - XYZ 23-01-2022 - 0.00 10.00 - 0 - 0 // fees relief is credit amount
========================================================================

I want a sql query that will output the data in the folowing format

AccountId, Older, 28Days,21Day,14Days,7 Days, Total amount Owed

Database is mysql and I will provide you the database and the data as sql file.
Thank you