Hello there,
Hope you all are doing great. I am stuck at a problem. The problem is that i have a SQL table and it hase around 10 columns but only 3 are useful in this scenario ( CardsNumber, MerchantID and Date).
Lets focus on CardNumber and Merchant for a moment.
Lets assume that i have following data in the table.
CardNumber MerchantID date
123 abc 1160101
123 abc 1160103
234 xyz 1160105
645 abc 1160301
123 xyz 1160102
345 abc 1160110
345 xyz 1160310
Note:
In above data, Date is in float and in format 1yymmdd.
I want to apply a few filters on above data.
In my application on frontend i will be entering cardNumber which are entered dynamically(rows can be added at runtime if there are more than one card number) and Date range (StartDate and EndDate). Now lets assume that on frontend i am entering 3 cards (123, 345 and 645) and date range from 1st Jan 2016 till 1st March 2016. When the submit button is clicked it should retrieve information based on following filters.
1. Fetch data that have different cards and same Merchants.
In the above dataset the different cards on same merchant are
123 abc 1160101
645 abc 1160301
123 xyz 1160102
345 xyz 1160110
2. Fetch only those records which have datedifference of 10 days.
In above dataset only following records should be fetched
123 xyz 1160102
345 xyz 1160110
So this is how the filteration should work.
If there is anything that is not cleared, i would be more than happy to clear it.
Looking forward to your usual help.
Thanks.
What I have tried:
I have tried many things but unable to find a relavent solution