AI Associate Data for AI Practice Question
A data engineer needs to create a feature that represents the average purchase amount per customer over the last 30 days. The transactional data is timestamped. Which feature engineering technique is most appropriate?
⚠ Common exam trap
Salesforce often tests the distinction between simple aggregation (like sum or count) and time-windowed aggregation, trapping candidates who overlook the 'over the last 30 days' temporal constraint and choose a static aggregate instead.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Rolling average of purchase amounts over a 30-day window
A rolling average over a 30-day window directly computes the average purchase amount per customer for only the most recent 30 days of transactions, which matches the requirement of a time-sensitive feature. This technique uses a sliding window function (e.g., AVG() with a ROWS or RANGE frame in SQL, or rolling().mean() in pandas) that respects the timestamp order, ensuring only relevant data contributes to the feature.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Sum of all purchase amounts per customer
Why it's wrong here
Sum doesn't give average.
- ✓
Rolling average of purchase amounts over a 30-day window
Why this is correct
Rolling average matches the requirement.
- ✗
Count of purchases per customer
Why it's wrong here
Count is not average.
- ✗
Minimum purchase amount per customer
Why it's wrong here
Min doesn't reflect average behavior.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AI Associate question from scratch — 753 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI Associate practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI Associate exam.