SQL Help - AR Aging by Invoice Due Date
I'm trying to recreate the AR Aging by Invoice Due Date report found in Zoho Books.
I'm guessing I'll have to use SQL. I've create a SQL statement that will give me the correct aging buckets and it works well but it doesn't work for historical information. For example, I would like to see what my aging buckets were on 1-1-2019.
Any input as to how to accomplish this? I'm open to using pivot tables if more appropriate.