Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello world!
I am looking for a load solution (not front in calculation) if possible for finding the date of the highest value in a table.
I have a Donor table that has Fields like: Donor ID, Name, Initial Gift Date, Last Gift Date, Max Gift Date
and I have a Gift table with Field: Gift ID, Donor ID, Gift Amount, Gift Date, Gift Type
What I need to answer are these questions
For each Donor:
1) When was their first gift and for how much was the gift for?
2) When was their most recent gift and for how much?
3) What is the largest gift this donor has given and what is the date on that gift?
I think these will need to end up joined to the Donor table, though the information comes from the gift table.
I have seen a post by stalwar1 on a similar topic for a front end solution here: https://qliktech.hosted.jivesoftware.com/docs/DOC-9044
but I would like a backend solution where this is done in the load script to manage the data more easily.
Thanks in advance!
Making the change and reloading.
What is the purpose of doing this division by 10000000000?
Giving lower weight in the sorting... here I want to sort first by GiftAmount and then by GiftDate...
OK, I think I understand.
Is this in case the Gift are all the same amount, so there is not a unique "Max" gift?
Absolutely!! Since there are multiple gifts which are max, in order to pull the max date, I need to add that to the sorting. So, Max Gift on Max Date
Everything is loaded in and it's working perfectly.
Thanks stalwar1!