Write Custom AMC SQL Queries Using AI
/amc-sql-writerDescribe the report you want. Get back AMC SQL that runs first time, with the units and privacy rules already handled.
- Runs in
- Claude Desktop, Claude Code
- Reads
- Data you hand it, nothing to connect
- Returns
- ntb-by-asin-display-then-search.sql
- Download
- amc-sql-writer.zip · 143 KB
How to run the skill. Three steps, under three minutes.
- Step 01
Upload the skill file once
Download it above, then add it to Claude under Customize, then Skills. It becomes
/amc-sql-writerin every chat after that.Where it goes- Claude Desktop or web
- Customize › Skills › Add › Upload a skill
- Claude Code
- Unzip into
~/.claude/skills/
- Step 02
Describe the report
Plain English. Say the metric, the grain and the audience path. You do not need to know the schema; the skill carries 29 tables and the unit and privacy rules.
What to give it- Metric
- New-to-brand rate
- Grain
- by ASIN
- Path
- display before search
- Window
- set in the AMC date picker
- An AMC instance you can query
- The metric and grain you want
- No MCP needed, paste the SQL yourself
- Optional: AdLabs MCP to validate and run it
- Step 03
Say this
Take the query to the AMC console. Or connect the AdLabs MCP and have it validated and run for you.
Open the full setup guide (PDF)New-to-brand rate by ASIN for shoppers who saw display before search.
Claude, using the skillThen, in the same chat- Picked tables: dsp_impressions, sponsored_ads_traffic
- Units: DSP millicents, sponsored microcents
- Dates on _dt, advertiser-local
- Aggregation kept above the privacy thresholds
- Returned the query, metrics derived in a CTE
ntb-by-asin-display-then-search.sql
- This query returns empty. Here it is, what is wrong with it?
- Why is my spend column 100,000 times too big?
What you get back. Deep AMC Insights on Your Brand and Ads.
A query you paste into the AMC console. Base logic isolated as a CTE, metrics derived in the outer select, units converted and privacy thresholds respected, so it runs on the first try instead of failing quietly.
- Base logic as a CTE
- Metrics derived in the outer select
- Units converted, not guessed
- Divide-by-zero guarded
Eight field-tested queries ship inside the skill.
Back to all skills
Start Your Free 30-Day Trial
Try every AdLabs Pro feature free for 30 days. No credit card required.