A single value column is counted.

highlighted = computed this step

Choose the value column

COUNT DISTINCT counts unique values from one chosen column.

choose value column\text{choose value column}

Read the column

This lesson counts distinct values in the buyer column.

value column shown\text{value column shown}

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.

Choose the value column: input rowsidregionbuyer1eastann2eastann3eastNULL4eastbea5westcy6westcy7northNULL8northNULL group bucketskeysourceRowsrowCount[all_rows][0, 1, 2, 3, 4, 5, 6, 7]8 distinct non-NULL value bucketskeydistinctValuesvalueSourcesnullSourceRowsduplicatesFoldedcountDistinct[all_rows][ann, bea, cy][{value:ann, sourceRows:[0, 1]}, {value:bea, sourceRows:[3]}, {value:cy, sourceRows:[4, 5]}][2, 6, 7]23 COUNT DISTINCT output rowsdistinct_count3 COUNT DISTINCT factsfactvalueinputRowCount8groupCount1outputRowCount1valueColumnbuyernullSkipped3duplicateValuesFolded2allNullGroups0groupOrderfirst_seen_source_order

Rows are still visible

The table stays visible so the value column can be checked row by row.

row by row check\text{row by row check}

Summary

The chosen column is part of the compiled facts, not prose-only.

compiled column fact\text{compiled column fact}