Oracle一表查询的结果集作为另一表查询的字段

现有两表
student表:
id name
11 张三
22 李四

subject成绩表:
studentid subjectname score
11 语文 88
11 数学 78
22 语文 86

想要得到这样一个查询结果
id name count(subject.*)
11 张三 2
22 李四 1

需要在一个sql里实现,请问该怎么写?

[code="java"]

select s.id ,s.name,sub.c from student s ,
(select studentid,count(*) as c form subject s group by s.studentid) as sub
where s.id=sub.studentid

性能不怎样 但是应该没错
[/code]

使用union 吧。但这个有个缺点,两边表的字段必须一样多
例如:
select id from table1 union
select name from table2
这样是可以的。
但 select id,name from table1 union
select name from table2
这样就不行了。

1、子查询
select id, name, (select count(*) from subject s2 where s1.id=s2.studentid) from student s1
2、连表
select id, max(name), count(*) from student s1, subject s2 where s1.id = s2.studentid group by id