Use case: Data Processing, Formatting & Math
Instruction type: Conditional
Prompt style: Context prompting

Prompt:
I am creating some donor events. I need to work out who to invite.  I have a list of donors from some past events and campaigns here.   I first need to get some basic donor metrics, like recency, frequency and average amount.

Classify donors into Tiers according to their annual total donation amount: 
Buddy Tier: up to $500; 
Bestie Tier: $501 up to $1000;
Loyal Tier: $1001 up to $5000
Premium Tier: $5001-$10000
Patron: more than $10000 in any one calendar year.

Establish the Recency metric for each: state last donor gift date
Establish the Frequency metric for each: how often have they donated in the time period.
Establish the average donation amount across all donations.

If the donor has made multiple donations on the same date, flag this, in case there is an error.  Some donors will donate more than once at a charity event or on behalf of others in attendance.

If the donor has donated any amount at an event, add them to a list of donors we will invite to another event.

If the donor has donated more than $1000 at an event, note this in a column beside their name as ED1.

If a donor has donated more than $1000 at multiple events, note this in a second column beside their name as EDM

Create a separate list of donors ranked in order of Frequency

date	donor id	amount	EVENT
14/12/2023	11268	 $35.00 	
16/12/2024	11268	 $10,325.00 	
19/02/2025	11268	 $1,225.00 	EVENT
26/07/2025	11268	 $9,930.00 	
3/07/2025	11803	 $413.00 	
3/09/2025	11803	 $475.00 	
22/11/2025	11803	 $1,010.00 	
26/01/2023	12159	 $820.00 	
25/03/2024	12159	 $96.00 	EVENT
9/09/2025	12159	 $2,100.00 	
18/10/2022	12647	 $212.00 	
14/02/2023	12647	 $3,860.00 	
9/10/2025	12647	 $460.00 	
7/01/2023	12985	 $911.00 	
20/02/2023	12985	 $175.00 	EVENT
20/08/2023	12985	 $1,050.00 	
27/02/2023	13204	 $2,065.00 	
16/09/2023	13204	 $640.00 	
11/06/2024	13204	 $1,986.00 	
12/11/2024	13204	 $518.00 	EVENT
27/03/2023	13629	 $480.00 	
19/02/2025	13629	 $470.00 	EVENT
22/02/2025	13629	 $202.00 	
5/05/2023	13958	 $574.00 	
5/06/2023	13958	 $1,060.00 	
3/09/2025	13958	 $1,225.00 	
13/06/2023	14267	 $2,940.00 	
9/09/2025	14267	 $475.00 	EVENT
13/09/2025	14267	 $8,028.00 	
30/06/2023	14892	 $710.00 	
28/11/2023	14892	 $229.00 	
9/10/2025	14892	 $2,100.00 	EVENT
6/08/2022	15230	 $415.00 	
26/03/2023	15230	 $460.00 	
2/08/2023	15230	 $2,445.00 	
6/02/2023	15327	 $3,190.00 	EVENT
20/02/2023	15327	 $14,000.00 	EVENT
19/02/2025	15327	 $495.00 	EVENT
15/04/2023	15746	 $1,050.00 	EVENT
25/08/2023	15746	 $4,735.00 	
19/04/2024	15746	 $795.00 	EVENT
14/03/2024	15782	 $99.00 	EVENT
7/09/2023	16289	 $1,385.00 	
26/10/2024	16289	 $387.00 	
22/07/2023	16439	 $128.00 	
20/08/2023	16439	 $820.00 	
27/02/2023	16740	 $3,200.00 	EVENT
20/05/2025	16740	 $593.00 	EVENT
3/09/2025	16740	 $640.00 	EVENT
15/02/2023	16825	 $588.00 	EVENT
20/09/2023	16825	 $3,200.00 	EVENT
1/12/2022	17243	 $142.00 	
1/11/2023	17243	 $1,550.00 	
3/03/2023	17295	 $3,808.00 	
27/03/2023	17295	 $1,550.00 	
9/09/2025	17295	 $4,810.00 	
28/11/2023	17904	 $2,590.00 	
30/06/2025	17904	 $489.00 	
9/09/2023	18267	 $947.00 	
24/11/2023	18267	 $2,475.00 	
5/06/2023	18563	 $2,590.00 	
15/10/2024	18563	 $196.00 	
9/10/2025	18563	 $795.00 	
20/09/2024	19403	 $3,200.00 	
17/03/2025	19403	 $277.00 	EVENT
7/07/2022	19428	 $972.00 	
13/06/2023	19428	 $2,475.00 	
17/10/2025	19428	 $387.00 	
21/07/2024	20358	 $640.00 	
31/10/2024	20358	 $820.00 	
2/08/2023	21704	 $3,200.00 	
26/01/2024	21704	 $94.00 	
19/02/2025	21704	 $588.00 	
16/09/2023	21857	 $3,860.00 	
9/01/2025	21857	 $962.00 	EVENT
4/01/2022	21947	 $310.00 	
16/12/2024	21947	 $3,860.00 	
31/10/2022	22496	 $5,540.00 	
13/01/2024	22496	 $175.00 	
10/01/2025	22496	 $175.00 	
25/08/2023	22951	 $2,375.00 	EVENT
12/09/2023	22951	 $245.00 	EVENT
3/09/2025	22951	 $142.00 	EVENT
1/06/2024	23641	 $2,065.00 	
5/06/2024	23641	 $17,538.00 	
28/05/2025	23641	 $2,065.00 	
7/09/2023	24386	 $10,500.00 	EVENT
4/04/2025	24386	 $95.00 	EVENT
9/09/2025	24386	 $489.00 	
11/08/2024	24780	 $480.00 	EVENT
18/12/2024	24780	 $57.00 	EVENT
3/09/2025	24780	 $480.00 	EVENT
23/12/2022	25617	 $420.00 	
20/09/2023	25617	 $2,300.00 	
9/10/2025	25617	 $947.00 	EVENT
27/04/2023	26835	 $206.00 	EVENT
20/10/2024	26835	 $1,060.00 	EVENT
9/09/2025	26835	 $1,060.00 	EVENT
15/04/2023	26894	 $277.00 	EVENT
1/11/2023	26894	 $5,250.00 	
1/08/2025	26894	 $92.00 	
28/03/2023	27903	 $210.00 	
20/08/2023	27903	 $640.00 	
28/11/2023	27903	 $3,200.00 	
16/09/2023	29147	 $310.00 	
10/10/2023	29147	 $7,087.00 	
24/11/2023	29147	 $1,550.00 	
13/03/2024	30468	 $2,590.00 	
19/02/2025	30468	 $518.00 	
19/06/2025	30468	 $10,000.00 	
2/09/2025	31274	 $740.00 	
9/10/2025	31274	 $1,175.00 	EVENT
24/01/2023	31652	 $53.00 	EVENT
25/03/2024	31652	 $2,475.00 	EVENT
3/09/2025	31652	 $495.00 	EVENT
11/11/2023	32718	 $47.00 	EVENT
17/10/2025	32718	 $24,700.00 	EVENT
13/04/2024	32984	 $3,200.00 	EVENT
8/08/2024	32984	 $229.00 	EVENT
5/05/2024	33217	 $375,000.00 	EVENT
30/11/2025	33217	 $3,878.00 	EVENT
17/02/2024	34509	 $15,000.00 	EVENT
29/05/2024	34509	 $1,425.00 	EVENT
14/02/2023	34862	 $12,000.00 	
29/08/2024	34862	 $988.00 	EVENT
21/09/2022	35742	 $57.00 	EVENT
11/07/2024	35742	 $4,100.00 	EVENT
2/05/2024	36815	 $164.00 	EVENT
20/09/2024	36815	 $19,300.00 	EVENT
9/09/2025	36815	 $640.00 	EVENT
9/04/2023	37964	 $772.00 	
31/10/2024	37964	 $875.00 	
10/05/2025	37964	 $4,555.00 	
9/10/2025	37964	 $470.00

Evaluation criteria:
The response should present a primary analysis of donor metrics in logical, organized format. For example, it could use a table with each row representing a unique donor ID and columns for: recency (date), frequency (number of donations), average donation (amount), Tier, and any applicable flags like 'ED1' or 'EDM'.
The response should state the following donors reached "Patron" as their highest tier: 11268, 15327, 23641, 24386, 30468, 32718, 33217, 34509, 34862, and 36815.
The response should state the following donor reached "Buddy" as their highest tier: 15782.
The response should state the following donors reached "Bestie" as their highest tier: 13629, 16439, 24780.
The response should state the following donors reached "Loyal" as their highest tier: 11803, 12159, 12647, 12985, 13204, 13958, 14892, 15230, 16289, 16740, 16825, 17243, 17904, 18267, 18563, 19403, 19428, 20358, 21704, 21857, 21947, 22951, 25617, 26835, 27903, 31274, 31652, 32984, 35742.
The response should state the following donors reached "Premium" as their highest tier: 14267, 15746, 17295, 22496, 26894, 29147, 37964.
The response should create a separate list of donors who should be invited to another event.
The response should base Tiers on the annual donation amount in any one year, rather than the average annual donation amount.
The response should create a separate list of donors from the data, ranked from high to low based on their donation frequency.
The response should classify the following donors as "ED1": 11268, 14892, 15327, 15746, 16740, 16825, 22951, 24386, 26835, 31274, 31652, 32718, 32984, 33217, 34509, 35742, 36815.
The response should classify the following donors as "EDM": 15327, 26835, 33217, 34509.
The response should include a 'Recency' metric which is correctly identified as the most recent donation date for each donor: donor 11268 is 26/07/2025, donor 11803 is 22/11/2025, donor 12159 is 9/09/2025, donor 12647 is 9/10/2025, donor 12985 is 20/08/2023, donor 13204 is 12/11/2024, donor 13629 is 22/02/2025, donor 13958 is 3/09/2025, donor 14267 is 13/09/2025, donor 14892 is 9/10/2025, donor 15230 is 2/08/2023, donor 15327 is 19/02/2025, donor 15746 is 19/04/2024, donor 15782 is 14/03/2024, donor 16289 is 26/10/2024, donor 16439 is 20/08/2023, donor 16740 is 3/09/2025, donor 16825 is 20/09/2023, donor 17243 is 1/11/2023, donor 17295 is 9/09/2025, donor 17904 is 30/06/2025, donor 18267 is 24/11/2023, donor 18563 is 9/10/2025, donor 19403 is 17/03/2025, donor 19428 is 17/10/2025, donor 20358 is 31/10/2024, donor 21704 is 19/02/2025, donor 21857 is 9/01/2025, donor 21947 is 16/12/2024, donor 22496 is 10/01/2025, donor 22951 is 3/09/2025, donor 23641 is 28/05/2025, donor 24386 is 9/09/2025, donor 24780 is 3/09/2025, donor 25617 is 9/10/2025, donor 26835 is 9/09/2025, donor 26894 is 1/08/2025, donor 27903 is 28/11/2023, donor 29147 is 24/11/2023, donor 30468 is 19/06/2025, donor 31274 is 9/10/2025, donor 31652 is 3/09/2025, donor 32718 is 17/10/2025, donor 32984 is 8/08/2024, donor 33217 is 30/11/2025, donor 34509 is 29/05/2024, donor 34862 is 29/08/2024, donor 35742 is 11/07/2024, donor 36815 is 9/09/2025, donor 37964 is 9/10/2025.
The response should include a 'Frequency' metric which counts the number of separate donations made by each donor:
11268 (4), 11803 (3), 12159 (3), 12647 (3), 12985 (3), 13204 (4), 13629 (3), 13958 (3), 14267 (3), 14892 (3), 15230 (3), 15327 (3), 15746 (3), 15782 (1), 16289 (2), 16439 (2), 16740 (3), 16825 (2), 17243 (2), 17295 (3), 17904 (2), 18267 (2), 18563 (3), 19403 (2), 19428 (3), 20358 (2), 21704 (3), 21857 (2), 21947 (2), 22496 (3), 22951 (3), 23641 (3), 24386 (3), 24780 (3), 25617 (3), 26835 (3), 26894 (3), 27903 (3), 29147 (3), 30468 (3), 31274 (2), 31652 (3), 32718 (2), 32984 (2), 33217 (2), 34509 (2), 34862 (2), 35742 (2), 36815 (3), 37964 (4)
The response should include the average donation amount for each donor (noting that formatting can vary, but that the rounding should be exactly to as follows): donor 11268 $5,378.75, donor 11803 $632.67, donor 12159 $1005.33, donor 12647 $1510.67, donor 12985 $712.00, donor 13204 $1302.25, donor 13629 $384.00, donor 13958 $953.00, donor 14267 $3814.33, donor 14892 $1013.00, donor 15230 $1106.67, donor 15327 $5895.00, donor 15746 $2193.33, donor 15782 $99.00, donor 16289 $886.00, donor 16439 $474.00, donor 16740 $1477.67, donor 16825 $1894.00, donor 17243 $846.00, donor 17295 $3389.33, donor 17904 $1539.50, donor 18267 $1711.00, donor 18563 $1193.67, donor 19403 $1738.50, donor 19428 $1278.00, donor 20358 $730.00, donor 21704 $1294.00, donor 21857 $2411.00, donor 21947 $2085.00, donor 22496 $1963.33, donor 22951 $920.67, donor 23641 $7222.67, donor 24386 $3694.67, donor 24780 $339.00, donor 25617 $1222.33, donor 26835 $775.33, donor 26894 $1873.00, donor 27903 $1350.00, donor 29147 $2982.33, donor 30468 $4369.33, donor 31274 $957.50, donor 31652 $1007.67, donor 32718 $12373.50, donor 32984 $1714.50, donor 33217 $189439.00, donor 34509 $8212.50, donor 34862 $6494.00, donor 35742 $2078.50, donor 36815 $6701.33, donor 37964 $1668.00.
The response should not flag any donors for making multiple donations on the same date.