Click here to Skip to main content
15,860,861 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My idea is to by using self join comparing the balance in the last 7 days.

1. If no difference in balance from last 7 days, then the customer is not depositing the money.

2. If there is a difference in balance from last 7 days, then the customer is depositing the money.

What I have tried:

what i have tried is applied self join successfully but not getting how to specify last 7 days to that comparison.
Posted
Updated 3-Mar-17 20:30pm
Comments
PIEBALDconsult 4-Mar-17 0:11am    
Is there no transaction table?
OriginalGriff 4-Mar-17 2:12am    
Without some idea of what you store, and how you store it we cannot help.
Please, use the "Improve question" widget to add information to your question.

1 solution

Of the data that are generated in every transaction there bound to include a date and type of transaction, e.g. credit and debit. They are essential data that are to be stored in some database tables, use them to achieve your objective. If they are not captured in the database, then you should re-look into your database design.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900