select * from
(select 班级,学生id,sum(成绩) 成绩 from table group by 班级,学生id
union
select 班级,null as 学生id,sum(成绩) 成绩 from table group by 班级) b
order by 班级
(select 班级,学生id,sum(成绩) 成绩 from table group by 班级,学生id
union
select 班级,null as 学生id,sum(成绩) 成绩 from table group by 班级) b
order by 班级
(select 班级,学生id,sum(成绩) 成绩 from table group by 班级,学生id
union
select 班级,null as 学生id,sum(成绩) 成绩 from table group by 班级) b
order by 班级,学生id
select distinct 班级,null 学生id,null 成绩,班级 flag from 成绩表
union all
select null 班级,学生id,成绩,班级 flag from 成绩表 ) tem order by flag
group by classid,studentID
order by classid,studentID
请问这句话到Sybase中应该做何改动?
From Table
Group By 班级,学生ID
With Cube