[Bug 247727] Re: mysql ignores view order when selecting with group by

Chad MILLER ubuntu at chad.org
Sun Jul 13 22:39:26 BST 2008


Agreed, not a bug.

More specifically, the row that is chosen to represent a class of rows
defined by GROUP BY is undefined.  In most other SQL implementations, it
is even /illegal/ to SELECT columns that are neither aggregate functions
nor the columns listed in the GROUP BY expression, and so you could
never even know what row was chosen to represent that group.  You should
/never/ rely on any value you get outside the GROUP BY expressions or an
aggregate function.

You almost certainly should be using a subselect to join grouped data
with a particular, /well-defined/ row of the dataset that you're
interested in.

-- 
mysql ignores view order when selecting with group by
https://bugs.launchpad.net/bugs/247727
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-dfsg-5.0 in ubuntu.



More information about the Ubuntu-server-bugs mailing list