[DB-SIG] Strange resultset with ORDER BY col1, GROUP BY col2

Chris Cogdon chris at cogdon.org
Fri Jun 24 17:25:19 CEST 2005


On Jun 24, 2005, at 8:14 AM, Chris Cogdon wrote:

>
> On Jun 24, 2005, at 4:19 AM, Andy Todd wrote:
>
>
>> - Do you need to do the group_concat transposition in SQL or would
>> it be
>> better achieved in Python after you've select all of the group,
>> comment
>> pairs from the database?
>>
>
> If you're grouping a particular column, you MUST use some kind of
> aggregate function on that column (eg, sum, max, or the mysql
> specific group_concat).

Self correction: an aggregate function on OTHER columns :)


-- 
    ("`-/")_.-'"``-._        Chris Cogdon <chris at cogdon.org>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL



More information about the DB-SIG mailing list