I think this should be easy, but it\'s evading me. I\'ve got a many-to-many relationship between Accounts and Account Groups. An Account can be in zero or more Groups, so I\
How about:
SELECT act.acctid AS AcctId, bankName, acctNumber, Balance,
jag.gid AS GroupID, gp.groupname AS GroupName
FROM accounts AS act
LEFT OUTER JOIN JointAccountGroups AS jag ON act.id = jag.aid
LEFT OUTER JOIN AccounGroups AS gp ON jag.gid = gp.id
Does this give you an error? An error that is easier to figure out perhaps?