GROUP BY n.mid ORDER BY MAX(n.nid) DESC LIMIT 10;
SELECT a.ccid1,a.ccid13,a.subject,MAX(c.cid)AS cid,c.mid,c.oprice,c.createdate,m.company
FROM cms_commu_offer c
INNER JOIN cms_members_2 m ON m.mid=c.mid
INNER JOIN cms_archives12 a ON a.aid=c.aid
GROUP BY c.mid ORDER BY MAX(c.cid) DESC LIMIT 10;