update candidate a,(select cid,count(1) as cnt from candidatepoll group by cid) b set a.click = b.cnt where a.id = b.cid
a记录用户基本信息
b是每次详细的点击情况
update candidate a,(select cid,count(1) as cnt from candidatepoll group by cid) b set a.click = b.cnt where a.id = b.cid