Hello,
I am working on some Output set elements for our Dev team and I have come a little stuck and I thought someone must have created these already...
I have managed to get the largest contribution amount but can't seem to get the corresponding date to output.
Also,
I have the last contribution date but not the amount.
Thank you,
Kelly
I believe it is in the output set cookbook. I would look there. If not I can post it up for you.
Travis
I've had a look in the Cookbook and they didn't seem quite what I was after.
There is one that looks at last cont to a specific Campaign - I'll have a look at amending that, but I was sure someone would have done that already. Being a little lazy.
Here is a view that will get you going. If need more let me know.
USE [impresario]GOSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate view [dbo].[lv_largest_gift]as/*****************************************************************************created 5/17/2011 tlaselect largest gift for output builderselect * from lv_largest_gift******************************************************************************/SELECT customer_no, max(cont_amt) as largest_cont_amt,max(cont_dt) AS largest_cont_amt_dtfrom t_contribution aWhere a.cont_amt =(select max(cont_amt) from t_contribution b where a.customer_no = b.customer_no)GROUP BY a.customer_noGOgrant select on [lv_largest_gift] to impusers GO
Thank you Travis!!