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!
Answering my own question, a few minutes after posting it (but hours into working on it):
Data Select: max(cont_dt)
Data From: t_contribution
Data Where: fund_no IN(<<p2>>)