Using Amazon’s natural‑language SQL for smarter targeting
Amazon Marketing Cloud (AMC) has become a vital tool for advertisers seeking to understand customer journeys across Amazon’s ecosystem. Traditionally, gleaning insights from AMC required knowledge of SQL and often relied on data scientists to write complex queries. In early 2025 Amazon announced a generative AI SQL generator that lets marketers describe the audience they want in plain language and receive a ready‑to‑run SQL query in return. This innovation dramatically reduces the time to insight and democratizes access to AMC’s rich data sets.
Understanding Amazon Marketing Cloud
AMC is a secure, privacy‑safe environment that allows advertisers to analyse aggregated, anonymised data from across Amazon properties—including Amazon.com, Amazon DSP, Twitch and streaming TV inventory. It helps brands measure campaign performance, understand multi‑touch attribution and build custom audiences for retargeting. Historically, using AMC has required marketers to write SQL queries that join data tables, filter events and compute metrics. This complexity limited adoption to teams with technical resources.
How the generative SQL generator works
The generative SQL generator introduces a natural‑language interface that translates plain‑English prompts into SQL code. Advertisers can say, for example, “Show me all users who viewed product X in the last 30 days, have not purchased it, but have watched at least two ads on Prime Video,” and the tool generates the appropriate query. Amazon’s announcement explains that the system reduces query development time from hours to minutes and eliminates the need for manual SQL. Once the query is generated, advertisers can review the logic, edit parameters if necessary, and run it in AMC. The tool also outputs a description of how the query was constructed, aiding transparency.
As of 2026 the feature remains in beta but is rolling out to advertisers worldwide. Amazon encourages users to work closely with their AMC representatives to understand capabilities and limitations.
Use cases and benefits
Generative SQL unlocks several valuable use cases:
- Audience building: Marketers can build highly specific custom audiences based on behaviours (views, adds‑to‑cart, purchases), media exposures (video ads, streaming TV, audio) and shopping patterns. For example, you can target users who viewed a particular product, visited a brand store, added items to their cart but didn’t checkout, and watched a connected‑TV ad. These segments can then be activated via Amazon DSP or third‑party channels.
- Campaign analysis: By phrasing questions in natural language—“Which ad placements drove the highest incremental reach among new-to-brand customers?”—marketers can quickly access metrics that previously required custom code.
- Cross‑channel insights: The tool allows you to join data across different channels (e.g., Twitch viewership and Amazon Fresh purchases) without writing complex join statements. This supports full‑funnel analysis.
- Speed and democratization: Reducing query time from hours to minutes means marketers can iterate faster. Teams without technical backgrounds can experiment with hypotheses and build audiences on the fly.
The benefits extend beyond convenience. With faster audience building, marketers can respond to trends in near real‑time, launching retargeting campaigns or shifting budgets based on live signals. Custom audiences created in AMC can also be exported to other platforms, such as streaming TV or audio, enabling integrated campaigns across Amazon’s ecosystem.
How to get started
To use the generative SQL generator effectively:
- Set up AMC access: Work with your Amazon representative to ensure you have the necessary permissions. AMC access is limited to advertisers with active campaigns.
- Define your business questions: Start with specific questions tied to your goals—for example, identifying lapsed buyers or understanding the path to conversion for a new product.
- Write clear prompts: When describing your query in natural language, include the key conditions (e.g., date range, events, exclusions) and the desired output (e.g., list of user IDs, aggregated counts). The clearer your prompt, the better the generated SQL.
- Review and refine: After the tool returns the SQL, review the logic. Ensure that filters and joins align with your objectives. Make adjustments as needed before running the query.
- Activate audiences: Once you have a list of users, export the segment to Amazon DSP or other channels. Consider combining AMC insights with first‑party data to create cross‑channel audiences.
- Iterate and test: Experiment with different prompts and conditions to discover new insights. Monitor performance and refine your criteria over time.
Best practices and potential limitations
While generative SQL lowers the barrier to entry, marketers should be mindful of best practices:
- Data privacy and compliance: AMC aggregates and anonymises data, but you must still respect user privacy and adhere to applicable regulations. Avoid constructing audiences that are too granular.
- Validation: Generative queries can sometimes include extraneous conditions or omit necessary filters. Always validate the SQL before execution to prevent misinterpretation.
- Interpretation: Analytics requires context. A query might reveal that users who viewed product X and watched a video ad are unlikely to purchase, but you must dig deeper to understand why. Use AMC as a starting point, not an end in itself.
- Combining data sources: AMC does not include off‑Amazon activity. Combine AMC insights with your first‑party CRM data and analytics tools for a holistic view.
Future outlook and trends
As generative AI capabilities mature, we can expect natural‑language interfaces to expand across marketing analytics tools. Competitors may introduce similar features, and integration with voice assistants could enable hands‑free querying. Amazon may also extend generative SQL to automate campaign optimisation—suggesting audience splits and budget allocations based on real‑time performance. Meanwhile, the increasing availability of LLMs for business intelligence will democratise data analysis, empowering marketers to become citizen analysts.
Conclusion and call to action
The generative SQL generator for Amazon Marketing Cloud makes advanced audience segmentation and reporting accessible to marketing teams without coding expertise. By describing your ideal audience in plain language, you can build precise segments, analyse campaign performance and activate cross‑channel marketing with unprecedented speed. To unlock the full power of AMC and integrate insights into your broader marketing strategy, Reach Ecomm offers expert guidance. We help you craft effective prompts, validate results and translate findings into revenue‑driving campaigns. Reach out today to learn more.
Context behind generative SQL
The technology behind natural‑language SQL relies on large language models trained on millions of code examples. These models learn the structure of SQL syntax and patterns for joining, filtering and aggregating data. When a user provides a prompt, the model decomposes it into logical clauses, identifies the relevant tables, and constructs a query accordingly. In Amazon’s implementation, the model uses a metadata catalogue of AMC’s schema to ensure it references the correct tables and fields. It also validates the query against the allowed set of operations to maintain privacy and security.
Adoption and market trends
Amazon’s generative SQL tool arrives amid a broader trend toward natural‑language interfaces in analytics. Gartner predicts that by 2028, 75 percent of enterprise analytics queries will be generated using conversational language. Early adopters report dramatic efficiency gains: tasks that once required a data analyst’s time can now be completed by a marketing manager in minutes. Adoption is particularly strong among mid‑sized brands without dedicated analytics teams. As more companies embrace privacy‑safe clean rooms like AMC, natural‑language query tools will become a differentiator.
Deeper use cases
Beyond audience building, generative SQL opens new analytical possibilities:
- Incrementality analysis: Marketers can ask, “How many incremental purchases were driven by my streaming TV campaign among customers who viewed a Sponsored Brands ad but did not click through?” The tool generates a control and treatment group and calculates incremental uplift.
- Customer lifetime value (CLV) segmentation: By requesting a list of users with high CLV who also show declining engagement, marketers can identify re‑engagement opportunities.
- Look‑alike modelling: Marketers can ask, “Create an audience that looks like my top 10 percent of spenders but excludes existing customers.” The model uses clustering techniques within AMC to find similar users.
- Cross‑shopping analysis: Asking, “Which categories do customers who buy my products also browse?” reveals cross‑selling opportunities across Amazon’s marketplace.
- Media frequency optimisation: Queries like “Show me the purchase rate versus ad exposure frequency for my latest campaign” help calibrate ad frequency caps.
Combining AMC data with first‑party insights
While AMC provides powerful visibility within Amazon’s ecosystem, it doesn’t capture behaviour outside Amazon. To build truly holistic segments, integrate AMC audiences with your own CRM and web analytics data. For instance, export a list of customers who viewed your product on Amazon but purchased on your site, and then retarget them with personalized email campaigns. Combine AMC signals with first‑party purchase history to refine segmentation. This cross‑channel approach ensures consistent messaging and avoids over‑frequency across multiple platforms.
Cautions and common misconceptions
Generative SQL is not a silver bullet. The natural‑language model may misinterpret ambiguous prompts. For example, if you ask for “all high‑value customers,” it needs clear criteria. Without specifying a threshold or a timeframe, the model may default to an arbitrary definition. To mitigate this, always include qualifiers in your prompts (e.g., “Customers with lifetime spend above $500 who purchased in the last 12 months”). Additionally, the generated query may not reflect business logic (e.g., excluding returns) unless you instruct it.
Another common misconception is that the tool eliminates the need for SQL expertise. In practice, marketing teams still benefit from a basic understanding of AMC’s schema and query logic. Reviewing and refining the generated SQL ensures accuracy and builds institutional knowledge. Over time, you’ll recognise patterns in how prompts map to queries and can refine your prompts accordingly.
The future of natural‑language analytics
Natural‑language analytics is poised to become ubiquitous across marketing platforms. We can envision a future where voice assistants ask, “Hey AMC, show me audiences with growing interest in eco‑friendly products,” and the query is executed instantly. Text‑to‑SQL features will extend beyond analytics to automated media buying; for example, generating bidding strategies or creative variants based on natural language goals. AI will assist with cross‑platform attribution by linking data from walled gardens and open web ecosystems. As the technology matures, expect more robust guardrails, such as alerts when prompts might return personally identifiable information or when queries could lead to data leakage.

