Would you ship this agent’s answer?
Two queries can run successfully and tell opposite stories. Guide a simulated analyst from a business question through a tool call and an evaluation before it answers the team.
Question from the search team
“Across all searches, did the share that led to an add-to-cart go up this week?”
Inspect the four source rows and metric definition
Each search counts once. The numerator counts searches with at least one add. Rows group searches by week and device.
| Week | Device | Searches | With an add |
|---|---|---|---|
| Prior | Mobile | 800 | 80 |
| Prior | Desktop | 200 | 60 |
| Current | Mobile | 600 | 54 |
| Current | Desktop | 600 | 174 |
SELECT week,
AVG(1.0 * searches_with_add / searches) AS result
FROM search_log
GROUP BY weekTake the full course
Explore the six-module course and capstone →
Leave your email for course enrollment updates from Allan.