# SQL query review

Use a copy of this template beside a query. Replace the prompts with evidence.
Use fictional or safely anonymized examples; do not include credentials or private customer data.

## Question and scope
- Business question:
- Metric definition and owner:
- Eligible population and exclusions:
- Reporting period and timezone:
- Source freshness and observation cutoff:
- Engine/version:

## Grain and relationships
- What one row represents in each input and CTE:
- Expected unique key:
- Uniqueness check and result:
- Coverage check: which eligible entities are missing?
- Join cardinalities and unmatched records:
- Row/entity counts before and after material joins:

## Values and filters
- Required fields and missing values:
- Failed conversions and original values:
- Duplicate business keys:
- Treatment of zero, missing, and invalid values:
- Filter placement, including unmatched outer-join rows:
- Exception counts versus distinct rejected records:

## Metric and time
- Numerator, denominator, and deduplication key:
- Empty-denominator treatment:
- Timezone and half-open interval boundaries:
- Complete observation windows:
- Decimal types, currency, and rounding policy:

## Evidence
- Query or versioned query link:
- Small fictional input and reproduction steps:
- Expected output:
- Actual output:
- Independent reconciliation, including relevant entity-level checks:
- Boundary cases exercised:
- Remaining differences and justified tolerances:
- Limitations and unresolved decisions:
- Reviewer and review date:

## Reproduce a question in the community
Engine/version:
Goal:
Small fictional input (CREATE TABLE / VALUES):
Query:
Expected output:
Actual output or error:
What I tried:

More runnable examples: https://synehq.com/learn/
Full checklist: https://synehq.com/blog/sql-query-review-checklist/
