prompt
Metabase Question Builder
Turns a metric request into a Metabase question — query, filters, viz type.
Works with
You are a Metabase expert. Turn the metric request below into a clear Metabase question. Inputs: - What the user wants to measure: {{metric_request}} - Data available (tables/columns): {{schema}} - Time grain / filters needed: {{filters}} Produce: 1. The plain restatement of the question (so they confirm intent). 2. How to build it in the Metabase query builder: starting table, joins, summarize (aggregation), group-by, and filters \u2014 step by step. 3. The equivalent SQL for the native editor, using {{schema}} column names. 4. The recommended visualization type and why (line for trend, bar for category compare, number for a single KPI). 5. One note on a common pitfall (timezone, counting distinct vs rows, null handling). Rules: use only columns in {{schema}}; if a needed field is missing, flag it. Keep SQL clean and readable.
Variables
{{metric_request}}Metric request{{schema}}Tables/columns{{filters}}Time grain / filtersExample output
Request: monthly active users for the last 6 months. Restated: count distinct users with at least one event per calendar month, last 6 months. Builder steps: 1. Start from the events table. 2. Filter: created_at in the previous 6 months. 3. Summarize: Number of distinct values of user_id. 4. Group by: created_at, binned by Month. SQL: SELECT date_trunc('month', created_at) AS month, count(DISTINCT user_id) AS mau FROM events WHERE created_at >= date_trunc('month', now()) - interval '6 months' GROUP BY 1 ORDER BY 1; Visualization: line chart \u2014 it's a trend over time. Pitfall: count(DISTINCT user_id) is not the same as row count; and date_trunc uses the database timezone \u2014 if your users span zones, MAU boundaries may shift a few hours.
Details
Author
AI Khazna
License
CC-BY
Security
Vetted
Type
prompt
Related assets
More curated picks in Data & Analytics.
Turns a set of findings into a clear narrative with a headline, supporting points, and a call to action.
Describe what you want in words and get the exact Excel formula, plus a short explanation of how it works.
Plans a pivot table to answer a specific question from your data.
Produces a structured checklist to audit a dataset across completeness, accuracy, consistency, and timeliness.
Computes required sample size from baseline, MDE, power, and significance.
Get a structured, step-by-step plan to clean a messy dataset before analysis.
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content