I have two data frame. one has multiple transaction for different customers on different dates and another data frame specifying a particular date. I wanted to get the sum of all transactions after the date specified into the other data frame. My 1st input table looks like :
ID  txn_date    txn_amt
1   01-Jan-19   3000
1   15-Jan-19   2000
1   16-Feb-19   5000
2   03-Jan-19   3000
2   19-Feb-19   9000
2   09-Mar-19   2000
2   01-Apr-19   1000
3   02-Apr-19   7000
and the 2nd table looks like this:
ID  notice_date
1   14-Jan-19
2   02-Feb-19
4   05-Feb-19
3   05-Mar-19
My expected output is :
ID  txn_amt
1   7000
2   12000
3   7000
4   0
The logic is, ID 1 in 1st table has 3 transactions where ID 1's notice_date is 14-jan-19, so after 14-jan-19 there are only two transaction of ID 1, so in the output table ID ones value is 7000 (2000 + 5000).
 
     
    