At 14:44 +0100 4/20/04, Andy Hall wrote:
Hi,

When using aggregate functions, I know you can retrieve the MAX, MIN, SUM, etc from all the values in your specific group from the GROUP BY.

Is there any function to simply return a list of the values in the group?

GROUP_CONCAT()?


Supported in MySQL 4.1 and up.


e.g.


SELECT id, LIST(buddy_id)
FROM buddies
GROUP BY id

which would return:

id    buddy_id
1     1,3,5
2     2,3

I cant see why this wouldnt be possible but I havent found anything yet.

Thanks for any help

Andy Hall.


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to