Challenge: Detect Spending Spikes
Task
Swipe to start coding
Write a query to flag transactions where the amount is at least double the customer's average transaction amount over the previous 12 months.
- For each record in the
performancetable, treat thescoreas the transaction amount. - Calculate the average transaction amount for each employee over the previous 12 months, not including the current transaction.
- Flag the transaction if its amount is at least double this average.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 7
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4.55
Challenge: Detect Spending Spikes
Swipe to show menu
Task
Swipe to start coding
Write a query to flag transactions where the amount is at least double the customer's average transaction amount over the previous 12 months.
- For each record in the
performancetable, treat thescoreas the transaction amount. - Calculate the average transaction amount for each employee over the previous 12 months, not including the current transaction.
- Flag the transaction if its amount is at least double this average.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 7
single