Comments - Why is ORDER BY in a FROM Subquery Ignored?

4 years, 9 months ago Stevie Robb

I am not sure if this is expected behaviour or not, but using GROUP BY in the subquery seems to force the overall query to accept the ORDER BY clause in the subquery.

Is this correct behaviour?

 
3 years, 4 months ago Michael Widenius

An effect of some of the GROUP BY algorithms (sorting and collecting rows) will create a table where the rows happens to be in order. It's however not guaranteed according to the SQL standard

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.