日期:2014-05-16 浏览次数:20714 次
Field Type Collation Null Key Default ------------------ ------------ -------------- ------ ------ ------- id int(11) (NULL) NO PRI (NULL) PROJECTID varchar(50) gbk_chinese_ci YES (NULL) USERID varchar(50) gbk_chinese_ci YES (NULL) select,insert,update,references USERNAME varchar(50) gbk_chinese_ci YES (NULL) select,insert,update,references a1 int(11) (NULL) YES 0 select,insert,update,references a2 int(11) (NULL) YES 0 select,insert,update,references a3 int(11) (NULL) YES 0 select,insert,update,references a4 int(11) (NULL) YES 0 select,insert,update,references a5 int(11) (NULL) YES 0 select,insert,update,references a6 int(11) (NULL) YES 0 select,insert,update,references a7 int(11) (NULL) YES 0 select,insert,update,references a8 int(11) (NULL) YES 0 select,insert,update,references
1 1 10001 教师1 10 10 2 0 0 0 3 8 2 1 10002 教师2 10 1 2 0 13 0 34 6 3 1 10003 教师3 10 12 2 0 30 3 12 4 4 1 10004 教师4 11 0 12 0 21 0 21 8
select count(distinct USERNAME) as 教师数, sum(a1) as a1_sum, sum(a2) as a2_sum, sum(a3) as a3_sum, sum(a4) as a4_sum, sum(a5) as a5_sum, sum(a6) as a6_sum, sum(a7) as a7_sum, sum(a8) as a8_sum from tb_name