'D Sdy mind telling me what is wrong with that beautiful expression?
SELECT *, COUNT(account.accountname_ID) AS 'count'
FROM account
RIGHT JOIN sessionmap account.accountname_ID=sessionmap.accountname_ID
GROUP BY account.accountname_ID
HAVING MAX(account.count)
You can't include columns in the results of a GROUP BY unless they are either part of the GROUP BY list or are aggregated somehow. If you remove the * from your SELECT list, you will get an answer.