16楼那小子买关子,从不说出来的,你别指望了,可以向吴想老师救教,吴老师在这方面是很历害的。如果你很急需用,可用笨办法处理
见附件,我已处理,你可复制
SQL:select 学校,班级,count(准考证) as 语文及格,0 as 数学及格,0 as 英语及格,0 as 物理及格,0 as 化学及格,0 as 政治及格,0 as 总人数 from [五原文化课总成绩$] where 语文>=72 group by 学校,班级 union all select 学校,班级,0 as 语文及格,count(准考证) as 数学及格,0 as 英语及格,0 as 物理及格,0 as 化学及格,0 as 政治及格,0 as 总人数 from [五原文化课总成绩$] where 数学>=72 group by 学校,班级 union all select 学校,班级,0 as 语文及格,0 as 数学及格,count(准考证) as 英语及格,0 as 物理及格,0 as 化学及格,0 as 政治及格,0 as 总人数 from [五原文化课总成绩$] where 英语>=72 group by 学校,班级 union all select 学校,班级,0 as 语文及格,0 as 数学及格,0 as 英语及格,count(准考证) as 物理及格,0 as 化学及格,0 as 政治及格,0 as 总人数 from [五原文化课总成绩$] where 物理>=60 group by 学校,班级 union all select 学校,班级,0 as 语文及格,0 as 数学及格,0 as 英语及格,0 as 物理及格,count(准考证) as 化学及格,0 as 政治及格,0 as 总人数 from [五原文化课总成绩$] where 化学>=60 group by 学校,班级 union all select 学校,班级,0 as 语文及格,0 as 数学及格,0 as 英语及格,0 as 物理及格,0 as 化学及格,count(准考证) as 政治及格,0 as 总人数 from [五原文化课总成绩$] where 政治>=60 group by 学校,班级 union all select 学校,班级,0 as 语文及格,0 as 数学及格,0 as 英语及格,0 as 物理及格,0 as 化学及格,0 as 政治及格,count(准考证) as 总人数 from [五原文化课总成绩$] group by 学校,班级
[ 本帖最后由 handsomcao 于 2011-8-4 16:00 编辑 ] |