select username,count(username) from News group by username
这个要关联查询。 select u.username,count(n.文章) from News as n ,users as u group by username