Concept Flow - NULL in DISTINCT, GROUP BY, and ORDER BY
Start Query
Evaluate SELECT
Apply DISTINCT
Group Rows with GROUP BY
Sort Rows with ORDER BY
Return Result Set
The query processes rows by selecting columns, then removes duplicates with DISTINCT, groups rows with GROUP BY, and finally sorts them with ORDER BY, treating NULLs as equal in DISTINCT and GROUP BY.