MySQL Forums :: Newbie :: GROUP BY error#1111 in MYSQL 4
GROUP BY error#1111 in MYSQL 4
Posted by: Wesley Yang
Date: October 27, 2009 08:18AM
Hi, I was writing a query for MYSQL 5, but it turns out my host is using version 4. My query does not seem to be working anymore and gives an error code 1111. I am having trouble finding out what the error is with my query. I can confirm that it works 100% on MySQL 5. Thanks so much.
SELECT m.member_id, m.group_id, m.screen_name, a.mescount as mescount
FROM exp_members m,
(SELECT member_id, COUNT(*) as mescount
WHERE editor_id = 27977
GROUP BY member_id) AS a
WHERE a.member_id = m.member_id
SELECT member_id, group_id, screen_name, 0 FROM exp_members ) as m
WHERE screen_name LIKE '%%'
AND group_id != 2
GROUP BY member_id
ORDER BY MAX(mescount) DESC,
CASE WHEN group_id = 1 then 5 WHEN group_id = 5 then 4 WHEN group_id = 6 then 2 WHEN group_id = 9 then 3 WHEN group_id = 14 then 1 WHEN group_id = 15 then 6 ELSE 7 END ASC,
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.