Hello,
I'm working on an Output Set Element to find the most recent contribution from a range of funds. So far, I can find either the most recent contribution overall or the most recent contribution from each of a number of funds selected. Here's the code that finds the most recent contribution from each fund:
Data Select: !.last_cont
Data From: (select customer_no, fund_no, max(cont_dt) as last_cont from t_contribution group by customer_no, fund_no)
Data Where: !.fund_no IN(<<p2>>)
Parameter 2 is a list of fund ids. This part works.
What I want is essentially to find the max(last_cont), or the most recent contribution to any of a collection of different funds. Any thoughts? Thanks!
In the Data From, don’t include fund_no in your select. Having it in the Where clause is what you want.
Lucie