Hi all,
I am trying to get a bunch of results, group them by category, and then
order each group of categories. My query is thus:
SELECT
l.CatalogNumber,
l.MP3Name,
l.PDFLink,
l.PDFName,
l.Title,
p.PublisherName,
c.ComposerLname,
The SQL specification does allow aggregates in the
ORDER BY. Does mySQL have any plans to add such
functionality (or at least add it to its list of
things it doesn't do)? The problem with the solution
of ordering by an alias is that I may not necessarily
want the thing I'm ordering by to be in th
At 5:52 -0700 10/3/03, Ed Smith wrote:
Why doesn't the following work:
mysql> CREATE TABLE dog(id integer, breed char(20),
age integer, weight integer)
;
mysql> SELECT breed, MIN(age)
-> FROM dog
-> GROUP BY breed
-> ORDER BY MIN(age);
ERROR : Invalid use of group function
I don't
Why doesn't the following work:
mysql> CREATE TABLE dog(id integer, breed char(20),
age integer, weight integer)
;
mysql> SELECT breed, MIN(age)
-> FROM dog
-> GROUP BY breed
-> ORDER BY MIN(age);
ERROR : Invalid use of group function
but this does
mysql> SELECT breed, MIN(age)