Finding most recent contribution over a range of funds

Former Member
Former Member $organization

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!

Parents Reply Children
No Data