Walks the _next chain (UNION/EXCEPT/INTERSECT) to find the statement
that carries the ORDER BY clause. This is the single shared implementation
replacing the duplicated versions in both engines.
Parameters
stmt: Record<string,unknown>
Returns Record<string,unknown>|null
Deprecated
Reads a node-sql-parser tree. Use SqlDocument.Parse(sql, dialect).TopLevelOrderBy().
Walks the
_nextchain (UNION/EXCEPT/INTERSECT) to find the statement that carries the ORDER BY clause. This is the single shared implementation replacing the duplicated versions in both engines.