I’m in real trouble here. I need your help. I have two tables: Issues and Payments with the following fields.
ISSUES
ProductID
TransactionDate
Quantity
UnitCost
CreditExpiryDate (14 days after transaction date)
CustomerID
PAYMENTS
CustomerID
TransactionDate
Amount
Goods are issued to customers on credit basis. Also, a customer is allowed to take additional goods even when the current credit is not fully settled. In that case, the customer would have two or more expiry dates.
What I want to do using a query or otherwise is to come up with all customers (defaulters) whose credit expiry dates have expired and their respective amounts due. If the customer had two or more credit expiry dates, I’m only interested in the most recent date but should come up with the total outstanding credit.
ISSUES
ProductID
TransactionDate
Quantity
UnitCost
CreditExpiryDate (14 days after transaction date)
CustomerID
PAYMENTS
CustomerID
TransactionDate
Amount
Goods are issued to customers on credit basis. Also, a customer is allowed to take additional goods even when the current credit is not fully settled. In that case, the customer would have two or more expiry dates.
What I want to do using a query or otherwise is to come up with all customers (defaulters) whose credit expiry dates have expired and their respective amounts due. If the customer had two or more credit expiry dates, I’m only interested in the most recent date but should come up with the total outstanding credit.