First-seen order is only this finite display convention.

highlighted = computed this step

First-seen model representative

This finite model shows the first seen representative so diagrams are deterministic.

deterministic display convention\text{deterministic display convention}

Read representative count

The model displays 3 first-seen representatives.

representatives=3\text{representatives}=3

DISTINCT examples are tiny finite bag-to-table transforms; this model shows first-seen representatives for deterministic display and does not claim product SQL output ordering.

First-seen model representative: bag input rowsidcitystatus1Austinopen2Austinopen3Bostonclosed4Austinclosed5NULLopen6NULLopen WHERE then SELECT projectionsourceinputwhereTruthprojectedRowdistinctRole0[1, Austin, open]TRUE[Austin]representative1[2, Austin, open]TRUE[Austin]duplicate2[3, Boston, closed]TRUE[Boston]representative3[4, Austin, closed]TRUE[Austin]duplicate4[5, NULL, open]TRUE[NULL]representative5[6, NULL, open]TRUE[NULL]duplicate DISTINCT groupskeysourcesrepresentativeSourceduplicateCount[Austin][0, 1, 3]02[Boston][2]20[NULL][4, 5]41 DISTINCT output rowscityAustinBostonNULL DISTINCT factsfactvalueinputRowCount6whereKeptRows6whereDroppedRows0projectedRowCount6distinctRowCount3duplicateDropCount3nullKeyRows2selectColumnCount1representativeOrderfirst_seen_model_order_not_sql_order_claim

No SQL order claim

This is a display convention for the static lesson, not a claim that SQL DISTINCT output is ordered.

not an output order claim\text{not an output order claim}

Summary

The order is pinned only so the generated artifact is stable.

stable finite artifact\text{stable finite artifact}