Hi:

 

I’m trying to group my result set by more than 1 column.  I’m doing so with the following:

 

from sqlobject.sqlbuilder import *

from model import CheckLog

 

conn = CheckLog._connection

query = Select([CheckLog.q.account, CheckLog.q.subAccount, CheckLog.q.accountName, func.Sum(CheckLog.q.amount)], groupBy=[CheckLog.q.account, CheckLog.q.subAccount, CheckLog.q.accountName], orderBy=CheckLog.q.account) x = conn.queryAll(conn.sqlrepr(query))

 

which nets me this SQL:

 

SELECT CheckLog.account, CheckLog.subAccount, CheckLog.accountName,

Sum(CheckLog.amount) FROM CheckLog GROUP BY (CheckLog.account, CheckLog.subAccount, CheckLog.accountName) ORDER BY CheckLog.account

 

MySQL pukes on this and gives me:

 

1241, 'Operand should contain 1 column(s)'

 

If I remove the parentheses around the columns in the Group By clause, everything works.  Is there anything I can do to get SO to NOT put the parens around that clause?

 

      -Jim