Expected COUNT DISTINCT facts are assertions only.
highlighted = computed this step
Honest by construction
Expected COUNT DISTINCT facts are assertions only.
compiler is source of truth
Render checked groups
The guarded grouped count renders 3 groups after recomputation.
checked groups=3
COUNT DISTINCT examples are tiny finite-table transforms; SQL dialect completeness, collations, type coercion, optimizer behavior, execution cost, indexing, and database-product claims are out of scope.
Try to tamper
Wrong expected facts, derived sidecars, duplicate columns, bools, floats, missing columns, and alias collisions fail closed.
tamper rejected
Summary
This book shows exact finite COUNT DISTINCT over one value column only.