Prompt that checks joins for mixed grain and stops metrics being distorted by row inflation. Paste it into an AI tool of your choice, which then finds mixed grain in joins.
Results depend on the tool, the model and what you enter.
Fill in
What you type stays in this browser window. We store and send nothing.
What are you building?
revenue report
funnel
stock
cohorts
dashboard extract
Which levels?
header and line
fact and dimension
event and master data
several facts
unclear
What is counted?
money sum
event count
unique people
stock
mixed
Your prompt
Help me find out whether joins in my analysis inflate rows and distort metrics.
Analysis: [Analysis]
Tables: [Tables]
Metric: [Metric]
Steps: 1. Read the query or model and write the grain of each table in your own words, such as one row per order or per line. 2. Check each join: can one left row match several right rows? 3. Recompute suspicious sums and counts before and after the join and compare with a known control number. 4. Propose aggregating to the metric's grain first and only then joining, or using a bridge table with unique keys. 5. Flag metrics that must not be summed after inflation. 6. Write a short note for the report if numbers were corrected.
Output: grain per table, list of inflating joins, corrected logic, control calculation and note text.
Take particular care to aggregate at the right grain before you join and add.
Before you answer, check: Are all instructions met? If key information is missing or a placeholder in square brackets is still in the text, ask instead of guessing. Mark assumptions as assumptions.
You have edited the prompt. Changes in the fields above no longer overwrite it.
This is an instruction for an AI, not the result itself.
Fill in the fields or tap a suggestion. Leave out names, addresses and other personal data.
Copy the finished prompt into an AI tool of your choice.
Paste the query or model, table descriptions and a known control number, without personal data.
Why does this work?
An order with three lines is counted three times once you join the header to the lines and then count orders. Grain must match the metric before you add.
Tips
Always check sums against a simple control query at the right grain.
Prompt that explains a cohort table, compares cohorts at the same age and separates chance differences from real trends.
Prompt · Intermediate · about 8 min
You may use our prompts freely, including at work. Please do not republish them as your own collection. We give no warranty for AI results; check them yourself. Terms of use