SELECT DISTINCT *,count(gm.group_member_user_id) AS `total` FROM
`group_members` AS gm,
`groups` AS g WHERE
gm.group_member_group_id=g.group_id
GROUP BY gm.group_member_group_id
ORDER BY `total` DESC
LIMIT 0, 4Got error 122 from storage engine