Why does this SQL ORDER BY in subquery get ignored?

Why does this SQL ORDER BY in subquery get ignored. The SQL code uses ORDER BY inside a derived table. In MySQL without LIMIT the optimizer ignores it. In SQL the order you expect is not the order you get.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlorderby #sql...

https://www.youtube.com/watch?v=f4mdNHOjKTg

Why does this SQL ORDER BY in subquery get ignored? #sqldebugging

YouTube

What's wrong with this SQL order by?

What's wrong with this SQL order by in a search endpoint. The SQL code interpolates a user supplied sort field, enabling injection. In SQL backends this exposes data and crashes queries.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlinjection #sqlorderby #sqlquery #sqlsecurity

https://www.youtube.com/watch?v=enGz-KrHnx4

Whats wrong with this SQL order by? #sqlreliability

YouTube