Customer payment report
Posted on 2011-03-03
I need to some help with writing a query against a couple of tables to create a report that shows statically what time frames customers normally make payments to us. basically see how many was paid 7 days early, On time, or 7 days late etc.
Table1 has: Invoice#, CutomerID, Net_due_date
Table2 has: Invoice#, Receipt#, Payment_date
Lets say for 2010 customer X 50 invoices paid. what days
Cust# Average#Days 7DaysEarly On-time 7DaysLate 14DaysLate
1001 12 0 2 8 10
I need to be able to get the output by customers or for the whole company.