This sounds a lot like homework to me. But here is some help anyway.
You are asking about an aggregate query, which implies that you should
use the group by clause, or only specify the aggregate function and where
clause that you need. you really want to learn this stuff, unless you are
just trying to pass a class.

http://docs.oracle.com/cd/B28359_01/server.111/b28313/aggreg.htm

I already gave you enough help to completely solve this, good luck.