Re: Aggregate functions in ORDER BY

2006-03-09 Thread Yasir Assam
temp table and then of course dropping it. -Original Message- From: Yasir Assam [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 7:10 PM To: mysql@lists.mysql.com Subject: Aggregate functions in ORDER BY Hello, I noticed something strange in MySQL (I'm using 4.1.15). If

Re: Aggregate functions in ORDER BY

2006-03-09 Thread Yasir Assam
sday, March 08, 2006 11:10 PM To: Dave Pullin Cc: mysql@lists.mysql.com Subject: Re: Aggregate functions in ORDER BY Many thanks for that Dave. Do you know whether it's possible for MySQL to return fully qualified column names by default? For example, I'd like

RE: Aggregate functions in ORDER BY

2006-03-09 Thread Dave Pullin
lto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 11:10 PM To: Dave Pullin Cc: mysql@lists.mysql.com Subject: Re: Aggregate functions in ORDER BY Many thanks for that Dave. Do you know whether it's possible for MySQL to return fully qualified column names by default? For ex

RE: Aggregate functions in ORDER BY

2006-03-08 Thread Nicolas Verhaeghe
dropping it. -Original Message- From: Yasir Assam [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 7:10 PM To: mysql@lists.mysql.com Subject: Aggregate functions in ORDER BY Hello, I noticed something strange in MySQL (I'm using 4.1.15). If I use an aggregate function in the

Re: Aggregate functions in ORDER BY

2006-03-08 Thread Yasir Assam
from etc order by count ) as subtable Dave -Original Message- From: Yasir Assam [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 9:10 PM To: mysql@lists.mysql.com Subject: Aggregate functions in ORDER BY Hello, I noticed something strange in MySQL (I'm using 4.1.15). I

RE: Aggregate functions in ORDER BY

2006-03-08 Thread Dave Pullin
bject: Aggregate functions in ORDER BY Hello, I noticed something strange in MySQL (I'm using 4.1.15). If I use an aggregate function in the ORDER BY clause I get an error. SELECT men.man_name, COUNT(pets.pet_id) FROM men, pets WHERE men.man_id = pets.pet_man_id GROUP BY men.man_i

Aggregate functions in ORDER BY

2006-03-08 Thread Yasir Assam
Hello, I noticed something strange in MySQL (I'm using 4.1.15). If I use an aggregate function in the ORDER BY clause I get an error. SELECT men.man_name, COUNT(pets.pet_id) FROM men, pets WHERE men.man_id = pets.pet_man_id GROUP BY men.man_id ORDER BY COUNT(pets.pet_id) DESC; gives