Which marketing channel is worth the money?
Compare weekly ad spend with sales to see which channel moves with sales, using a sample data table.
Also in: Español, Português, Français, Bahasa Indonesia, Русский, العربية, हिन्दी, বাংলা, 日本語, 中文
What this chat does
Find out which marketing channel's spend moves most closely with weekly sales, and get a test to check it.
A marketing lead keeps one row per week: spend on search, social and flyers, and the sales that week.
Asking which channel moves with sales is a quick way to see where money may be working. A correlation is only a clue, so the chat ends with a simple test to run before changing the budget.
How to do it
- Load the sample sheet into a table, replacing it if it already exists.
- Look at the last few weeks to check the data looks right.
- Ask which channel moves most with sales over a recent period.
- Plan a small test before moving budget, and compare the results after 4 weeks.
The chat
Sample data: marketing.csv (104 weeks, 2024-12-02 to 2026-11-23)
Recorded from a real run. Prompts and replies are as written; failed attempts and table look-ups are left out. Open a tool call to see what ran. (2026-12-03)
Load https://samples.gotsimplified.com/marketing/marketing.csv into a table called marketing. Replace it if it already exists.
No marketing table exists yet, so there's nothing to replace. I'll load the file into default.marketing.
Tool call · datalake_mutate
action: insert · namespace: default · table_name: marketing · url: https://samples.gotsimplified.com/marketing/marketing.csv
Successfully imported 104 rows into table 'default.marketing'.
- Namespace: default
- Table name: marketing
- Imported rows: 104
- Format: csv
- Mode: append
- Snapshot id: 5975786669951562762
Tool call · datalake_query
DESCRIBE default.marketing
- Namespace: default
- Table name: marketing
- Current snapshot id: 5975786669951562762
- Total snapshots: 1
Schema
| Id | Name | Type | Required |
|---|---|---|---|
| 1 | week | date | No |
| 2 | search_spend | long | No |
| 3 | social_spend | long | No |
| 4 | flyer_spend | long | No |
| 5 | sales | long | No |
Properties
None.
I loaded the CSV into a new table, default.marketing, with 104 rows. I found no existing marketing table in any of your namespaces, so nothing was replaced.
| Column | Type |
|---|---|
week | date |
search_spend | integer (long) |
social_spend | integer (long) |
flyer_spend | integer (long) |
sales | integer (long) |
You didn't name a namespace, so I used default. I didn't set a key or partitioning.
Show me the last 12 weeks, newest first.
Tool call · datalake_query
SELECT * FROM default.marketing ORDER BY week DESC LIMIT 12
| week | search_spend | social_spend | flyer_spend | sales |
|---|---|---|---|---|
| 2026-11-23 | 815 | 180 | 371 | 8478 |
| 2026-11-16 | 199 | 683 | 245 | 7049 |
| 2026-11-09 | 201 | 463 | 364 | 6503 |
| 2026-11-02 | 594 | 458 | 211 | 7973 |
| 2026-10-26 | 602 | 650 | 104 | 8263 |
| 2026-10-19 | 148 | 259 | 428 | 6456 |
| 2026-10-12 | 435 | 508 | 299 | 7911 |
| 2026-10-05 | 692 | 381 | 121 | 8164 |
| 2026-09-28 | 348 | 533 | 219 | 7177 |
| 2026-09-21 | 508 | 327 | 265 | 7035 |
| 2026-09-14 | 275 | 376 | 450 | 6733 |
| 2026-09-07 | 689 | 510 | 211 | 8467 |
12 rows.
Here are the last 12 weeks in default.marketing, newest first:
| Week | Search spend | Social spend | Flyer spend | Sales |
|---|---|---|---|---|
| 2026-11-23 | 815 | 180 | 371 | 8,478 |
| 2026-11-16 | 199 | 683 | 245 | 7,049 |
| 2026-11-09 | 201 | 463 | 364 | 6,503 |
| 2026-11-02 | 594 | 458 | 211 | 7,973 |
| 2026-10-26 | 602 | 650 | 104 | 8,263 |
| 2026-10-19 | 148 | 259 | 428 | 6,456 |
| 2026-10-12 | 435 | 508 | 299 | 7,911 |
| 2026-10-05 | 692 | 381 | 121 | 8,164 |
| 2026-09-28 | 348 | 533 | 219 | 7,177 |
| 2026-09-21 | 508 | 327 | 265 | 7,035 |
| 2026-09-14 | 275 | 376 | 450 | 6,733 |
| 2026-09-07 | 689 | 510 | 211 | 8,467 |
Over those 12 weeks, how much did we spend on each channel, and which one moves most with sales?
Tool call · datalake_query
SELECT COUNT(*) n, corr(search_spend, sales) r_search, corr(social_spend, sales) r_social, corr(flyer_spend, sales) r_flyer FROM default.marketing
| n | r_search | r_social | r_flyer |
|---|---|---|---|
| 104 | 0.875121760189628 | 0.34375542579610785 | 0.0366838762520527 |
1 row.
Tool call · datalake_query
SELECT COUNT(*) AS n, MIN(week) AS first_week, MAX(week) AS last_week, SUM(search_spend) AS search_total, SUM(social_spend) AS social_total, SUM(flyer_spend) AS flyer_total, SUM(sales) AS sales_total, corr(search_spend, sales) AS r_search, corr(social_spend, sales) AS r_social, corr(flyer_spend, sales) AS r_flyer FROM (SELECT * FROM default.marketing ORDER BY week DESC LIMIT 12) AS last12
| n | first_week | last_week | search_total | social_total | flyer_total | sales_total | r_search | r_social | r_flyer |
|---|---|---|---|---|---|---|---|---|---|
| 12 | 2026-09-07 | 2026-11-23 | 5506 | 5328 | 3288 | 90209 | 0.9190190830564822 | 0.07812644677938012 | -0.6011846005435446 |
1 row.
Search moves most with sales. These figures cover the 12 weeks from 2026-09-07 to 2026-11-23.
| Channel | Spend (12 weeks) | Share of spend | Correlation with sales (12 weeks) | Correlation (all 104 weeks) |
|---|---|---|---|---|
| Search | 5,506 | 39.0% | 0.92 | 0.88 |
| Social | 5,328 | 37.7% | 0.08 | 0.34 |
| Flyer | 3,288 | 23.3% | -0.60 | 0.04 |
| Total | 14,122 | 100% |
Sales over the same 12 weeks totalled 90,209.
- Search: weeks with more search spend tended to have higher sales, and the pattern holds across the full history.
- Social: there is almost no linear relationship in these 12 weeks, and only a weak positive one over all 104.
- Flyer: don't read the -0.60 as flyers hurting sales. It comes from only 12 data points and all but disappears over the full history (0.04).
Correlation runs from -1 to 1 and shows what moves together, not what causes what. For example, if search budgets were raised in weeks when demand was already expected to be high, that would also produce a strong correlation. These are same-week, one-channel-at-a-time figures, so they don't account for delayed effects or the other channels' spend. A controlled test that varies search spend would show whether it actually drives sales.
Try a small test: move 1,000 from social to search for the next 4 weeks. Do not change the sheet yet.
I'll run this as a what-if only, with nothing written to the table. First I need to estimate how sales have responded to each channel.
Tool call · datalake_query
SELECT COUNT(*) AS n, AVG(search_spend) AS m_s, AVG(social_spend) AS m_o, AVG(flyer_spend) AS m_f, AVG(sales) AS m_y, var_samp(search_spend) AS v_s, var_samp(social_spend) AS v_o, var_samp(flyer_spend) AS v_f, var_samp(sales) AS v_y, covar_samp(search_spend, social_spend) AS c_so, covar_samp(search_spend, flyer_spend) AS c_sf, covar_samp(social_spend, flyer_spend) AS c_of, covar_samp(search_spend, sales) AS c_sy, covar_samp(social_spend, sales) AS c_oy, covar_samp(flyer_spend, sales) AS c_fy, MIN(search_spend) AS min_s, MAX(search_spend) AS max_s, MIN(social_spend) AS min_o, MAX(social_spend) AS max_o FROM default.marketing
| n | m_s | m_o | m_f | m_y | v_s | v_o | v_f | v_y | c_so | c_sf | c_of | c_sy | c_oy | c_fy | min_s | max_s | min_o | max_o |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 104 | 452.9230769230769 | 383.50961538461536 | 263.7019230769231 | 7624.125 | 50251.95519044063 | 37725.39796489916 | 20322.2112584018 | 1253626.673543689 | 4047.2337565347275 | 421.2001493651987 | -364.79807692307764 | 219648.9223300971 | 74756.78033980587 | 5855.241504854378 | 113 | 877 | 53 | 694 |
1 row.
Tool call · datalake_query
SELECT COUNT(*) AS n, AVG(search_spend) AS m_s, AVG(social_spend) AS m_o, AVG(flyer_spend) AS m_f, AVG(sales) AS m_y, var_samp(search_spend) AS v_s, var_samp(social_spend) AS v_o, var_samp(flyer_spend) AS v_f, covar_samp(search_spend, social_spend) AS c_so, covar_samp(search_spend, flyer_spend) AS c_sf, covar_samp(social_spend, flyer_spend) AS c_of, covar_samp(search_spend, sales) AS c_sy, covar_samp(social_spend, sales) AS c_oy, covar_samp(flyer_spend, sales) AS c_fy FROM (SELECT * FROM default.marketing ORDER BY week DESC LIMIT 12) AS last12
| n | m_s | m_o | m_f | m_y | v_s | v_o | v_f | c_so | c_sf | c_of | c_sy | c_oy | c_fy |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 12 | 458.8333333333333 | 444.0 | 274.0 | 7517.416666666667 | 50239.78787878789 | 22062.727272727276 | 12456.363636363636 | -6934.363636363633 | -12665.090909090906 | -9450.0 | 158344.62121212122 | 8920.363636363623 | -51577.27272727273 |
1 row.
The estimate is that sales rise by about 1,600 to 2,700 over the 4 weeks, or roughly 5–9%. This is a projection from past data, not a real test result. I changed nothing in the table.
I read this as 1,000 in total, or 250 per week. It can't mean 1,000 every week, because social has never exceeded 694 in a week.
Plan, using the average of the last 12 weeks as the baseline:
| Per week | Baseline | Scenario | Change |
|---|---|---|---|
| Search | 459 | 709 | +250 |
| Social | 444 | 194 | -250 |
| Flyer | 274 | 274 | 0 |
| Total spend | 1,177 | 1,177 | 0 |
Estimated sales over 4 weeks, against a baseline of about 30,070:
| History used | Added sales per 1 of search | Added sales per 1 of social | Net gain from the shift | Scenario sales |
|---|---|---|---|---|
| All 104 weeks | 4.25 | 1.53 | about +2,700 | about 32,790 |
| Last 12 weeks | 3.81 | 2.20 | about +1,600 | about 31,680 |
These come from a linear regression of sales on all three channels together, which I calculated from the table's summary statistics.
Cautions
- Cause: the model shows association, so moving budget may not produce this gain.
- Limits: it assumes each extra unit of search keeps paying off at the same rate. At 709 a week you're within the past range (up to 877), but returns could shrink.
- Season: it ignores holidays, trends and delayed effects, all of which could matter in December.
If you run it for real
- Timing: the data ends with the week of November 23, and this week is already under way. The next four full weeks start December 7, 14, 21 and 28.
- Comparison: if you can, keep some comparable regions or audiences on the old split. A before-and-after comparison over the holidays could easily mistake seasonal change for the effect of the shift.
- Stop rule: agree in advance what result would make you switch back.
If you meant a different amount or baseline, I can rerun it.
Tools you need
- Data Lake →
Load the sheet and run the questions
Start with your own data
Sign up free, then connect your AI assistant so it can use these tools.