- A
Sum of all purchase amounts per customer
Why wrong: Sum doesn't give average.
- B
Rolling average of purchase amounts over a 30-day window
Rolling average matches the requirement.
- C
Count of purchases per customer
Why wrong: Count is not average.
- D
Minimum purchase amount per customer
Why wrong: Min doesn't reflect average behavior.
Quick Answer
The correct answer is the rolling average of purchase amounts over a 30-day window. This technique is the most appropriate because it computes a moving mean that respects the timestamp order of transactions, using a sliding window function—such as AVG() with a ROWS or RANGE frame in SQL or rolling().mean() in pandas—to ensure only the most recent 30 days of data per customer contribute to the feature. On the Salesforce AI Associate exam, this question tests your understanding of time-series feature engineering, specifically how to create a rolling average feature for an AI model that captures recent customer behavior without leaking future information. A common trap is confusing a simple overall average with a windowed calculation; the key distinction is that a rolling average dynamically updates as new timestamps enter the window. Memory tip: think of a “sliding spotlight” that only illuminates the last 30 days of data, ignoring everything older.
AI Associate Data for AI Practice Question
This AI Associate practice question tests your understanding of data for ai. Compare every option against the stated constraints before choosing — the best answer satisfies all requirements, not just the most obvious one. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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?
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
Option B is correct because 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.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
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.
Common exam traps
Common exam trap: answer the scenario, not the keyword
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.
Detailed technical explanation
How to think about this question
Under the hood, a rolling average over a 30-day window requires partitioning data by customer and ordering by timestamp, then applying a window function with a frame clause like RANGE BETWEEN INTERVAL '30' DAY PRECEDING AND CURRENT ROW (in SQL) or using a fixed-size window with a time-aware offset. A subtle behavior is that if a customer has no transactions in the last 30 days, the rolling average returns NULL, which must be handled (e.g., imputed with 0 or a global average) to avoid missing values in the model. In a real-world scenario, this feature is critical for churn prediction models where recent spending patterns are more indicative of customer behavior than lifetime aggregates.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the AI Associate exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Data for AI — study guide chapter
Learn the concepts, then practise the questions
- →
Data for AI practice questions
Targeted practice on this topic area only
- →
All AI Associate questions
506 questions across all exam domains
- →
Salesforce AI Associate AI Associate study guide
Full concept coverage aligned to exam objectives
- →
AI Associate practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related AI Associate practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
AI Fundamentals practice questions
Practise AI Associate questions linked to AI Fundamentals.
AI Capabilities in CRM practice questions
Practise AI Associate questions linked to AI Capabilities in CRM.
Ethical Considerations of AI practice questions
Practise AI Associate questions linked to Ethical Considerations of AI.
Data for AI practice questions
Practise AI Associate questions linked to Data for AI.
AI Associate fundamentals practice questions
Practise AI Associate questions linked to AI Associate fundamentals.
AI Associate scenario practice questions
Practise AI Associate questions linked to AI Associate scenario.
AI Associate troubleshooting practice questions
Practise AI Associate questions linked to AI Associate troubleshooting.
Practice this exam
Start a free AI Associate practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this AI Associate question test?
Data for AI — This question tests Data for AI — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Rolling average of purchase amounts over a 30-day window — Option B is correct because 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.
What should I do if I get this AI Associate question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More AI Associate practice questions
- A Salesforce admin implements Einstein Bots for customer service. To ensure the bot does not use biased language, what s…
- A data architect is designing a data model for Einstein Discovery. The data includes categorical variables with high car…
- A data analyst is evaluating data quality for an Einstein model. Which TWO dimensions are most critical for model accura…
- Which TWO actions are required to prepare data for an Einstein Discovery model?
- A sales manager wants to automatically prioritize leads based on their likelihood to convert. Which Einstein feature sho…
- A marketing team wants to use Einstein Engagement Scoring to prioritize leads. What is the primary input for this AI fea…
Last reviewed: Jun 30, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.