TRY:
SELECT groupid,max(userName)
FROM bbs_article
WHERE UserName = 'wo' and layer>1
GROUP BY groupid