SQL’s ORDER BY Has Come a Long Way
SMRTR summary
Back in the 1980s, SQL's ORDER BY clause was a rigid, limited thing. You couldn't sort by a column you hadn't selected. You couldn't use expressions. Null values? Good luck controlling where they landed.
Then came SQL:1999, what some call the "big bang" of modern SQL, which quietly rewrote the rules. Suddenly you could sort by non-selected columns, use complex expressions, and work with a far more flexible query language.
One persistent myth worth busting: those popular infographics urging developers to "filter early" for performance gains. Database engines have been doing that automatically for decades. As one authoritative source puts it, trust the execution plan, not infographics.
The ORDER BY clause has since migrated into subqueries, window functions, and JSON aggregation, quietly evolving into one of SQL's most versatile tools.
SMRTR provides this summary for quick context. The original article belongs to Reddit.
Read the original article