AnalyticsGoogle Ads analysisAdvancedWrites SQL / queries

Google Ads Query Language (GAQL) query builder

Gets a GAQL query for a specific report, with explicit instructions to confirm field names, unit conventions and segment compatibility.

For: Performance marketers, Marketing analysts, Growth marketers · Works with: Google Ads, Any capable chat model (ChatGPT, Claude, Gemini, others)

Public beta. This prompt was drafted with AI assistance and checked by automated rules, but it has not been reviewed or tested by a person yet. Treat it as a starting point and check the output. It is hidden from search engines while in beta. Use the “Was this prompt useful?” box to tell us what works.

Your prompt

Write a Google Ads Query Language (GAQL) query for this report: campaign-level cost, clicks, conversions and conversion value by day for the last 30 days. Level and resource I want to query from: campaign. Date range: the last 30 days (use segments.date and an explicit range). Filters: only enabled campaigns. Sort: segments.date ascending. Limit: 1000 rows. Metrics and attributes needed: campaign name, cost, clicks, impressions, conversions, conversions value. Requirements: - Use only the SELECT, FROM, WHERE, ORDER BY and LIMIT structure that GAQL supports. - State clearly which field names you are confident exist and which you are unsure about, and tell me to verify them in the Google Ads API reference and with the field-metadata service before running; do not invent field names. - Explain unit conventions I need to handle afterward (for example, monetary fields expressed in micros) and how to convert them. - Explain what adding a segment such as segments.date does to the row structure. - Mention any metric/segment compatibility issues I should check. - Provide a sanity check I can run (for example compare total cost with the Google Ads interface for the same dates), and state that results may differ for reasons like attribution settings or conversion lag. - List assumptions, and tell me if any field you need is missing or unavailable instead of guessing it.

Customize

The fields start with example values so you can see how the prompt works. Everything stays in your browser.

What the report should show.

The main resource in FROM.

Period.

WHERE conditions.

Ordering.

Maximum rows.

Metrics and attributes.

Example of what to expect

Illustrative only. It describes the kind of result this prompt aims for; real output varies by tool, model and run.

A GAQL query with a plain-language explanation, a list of fields to verify, unit-conversion notes for micros, a sanity check and assumptions. (Illustrative.)

Expected format: Query in a code block, field verification list, unit notes, sanity check.

How to use it

  1. Verify every field name in Google's reference before running.
  2. Convert micros to currency in your analysis.
  3. Compare totals with the interface.

Limitations

  • Models invent GAQL field names; always verify.
  • We could not confirm cost-field specifics from the overview page; check the reference.

Platform notes

Google Ads

Official docs read · checked 2026-10-11

Google Ads field names and units (for example cost expressed in micros in the API) must be confirmed in Google's reference; the GAQL overview page we read does not list them.

General notes on Google Ads
  • GAQL uses SELECT/FROM/WHERE/ORDER BY/LIMIT. Confirm resource and field names (for example cost fields, which are expressed in micros) in the API reference; the overview page does not list them.

Any capable chat model (ChatGPT, Claude, Gemini, others)

Official docs read · checked 2026-10-11

Works in any capable chat model. Paste a small anonymised export and recompute the key numbers yourself: chat models can misread columns or miscalculate.

General notes on Any capable chat model (ChatGPT, Claude, Gemini, others)
  • These prompts are plain text and work in any chat assistant. For analytics prompts, paste a small, anonymised export; a chat model can misread columns or miscalculate, so recompute key numbers yourself.

Source, license and attribution

Origin
Original by MarketerTools
Publisher
MarketerTools
License
Original work by MarketerTools, free to copy and use. Informed by the linked documentation; no third-party text is reproduced.
Platform assumptions checked
2026-10-11

Documentation and references behind this prompt

These informed the structure and the platform notes. A reference is not a license, and no third-party prompt text is copied here.

Spotted an attribution error, or are you a source owner with a request? Use the chat button at the bottom right and quote prompt ID ana-014. We will correct or remove it.

  • AnalyticsIntermediateAnalyses your data

    Google Ads search-terms report: wasted spend and negative keywords

    Groups search terms by pattern, estimates wasted spend from your data and proposes negatives, with a protected 'do not negate' list and match-type cautions.

    Google Ads · Any capable chat model (ChatGPT, Claude, Gemini, others)

  • AnalyticsIntermediateAnalyses your data

    Google Ads campaign diagnostic against CPA or ROAS targets

    Compares campaigns against your target, separates volume, efficiency and conversion-rate drivers, and highlights what the data cannot explain.

    Google Ads · Any capable chat model (ChatGPT, Claude, Gemini, others)

  • AnalyticsAdvancedWrites SQL / queries

    Review and optimise a marketing SQL query

    A code-review prompt for existing SQL: correctness first, then cost and readability, with changes explained and a test for equivalence.

    BigQuery / SQL · Any capable chat model (ChatGPT, Claude, Gemini, others)

  • AnalyticsIntermediateAnalyses your data

    Responsive search ad asset performance review

    Reviews headline and description asset reports for patterns and proposes new assets, while flagging how little asset-level data can prove.

    Google Ads · Any capable chat model (ChatGPT, Claude, Gemini, others)