select '' as type, `class`.`name` as cname, `score`.`cid`, `score`.`uid`, `user`.`name` as uname, `score` from `score` right join `class` on `score`.`cid` = `class`.`cid` left join `user` on `score`.`uid` = `user`.`uid`
union all( select '汇总', `c`.`cname`, `c`.`cid`, `c`.`uid`, count(`cid`) as uname, sum(`score`) as score from ( select '' as type, `class`.`name` as cname, `score`.`cid`, `score`.`uid`, `user`.`name` as uname, `score` from `score` right join `class` on `score`.`cid` = `class`.`cid` left join `user` on `score`.`uid` = `user`.`uid` ) c group by `cname` )
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论