Grouped output rows keep both key columns.

highlighted = computed this step

Output carries keys

The grouped output row carries both key columns before aggregate facts.

keys then facts\text{keys then facts}

Read output rows

The output has 5 rows in first-seen input order.

output rows=5\text{output rows}=5

Multi-column grouping examples are tiny finite table transforms; SQL dialect completeness, optimizer behavior, indexing, product behavior, and performance claims are out of scope.

Output rows carry both keys: base rowsidregionstatusqty1eastopen22eastopen33eastclosed14westopen45westNULL56eastNULLNULL7westopen1 Group bucketskeysourceRowsrowCount(east, open)(0, 1)2(east, closed)(2)1(west, open)(3, 6)2(west, NULL)(4)1(east, NULL)(5)1 Aggregate resultskeysourceRowsaggregates(east, open)(0, 1){n:2}(east, closed)(2){n:1}(west, open)(3, 6){n:2}(west, NULL)(4){n:1}(east, NULL)(5){n:1} Aggregate detailskeyaggregateseenaddednullSkippedresult(east, open)n202(east, closed)n101(west, open)n202(west, NULL)n101(east, NULL)n101 Output rowsregionstatusneastopen2eastclosed1westopen2westNULL1eastNULL1 Multi-group factsfactvalueinputRowCount7keyColumnCount2groupCount5aggregateCount1outputRowCount5nullKeyComponents2groupOrderfirst_seen_input_orderoutputCarriesKeyColumnsyes

Display order is finite

First-seen order is a display convention for this exact model, not a product output-order claim.

display order\text{display order}

Summary

Both key columns stay visible beside the aggregate.

both keys visible\text{both keys visible}