You need to learn a lot more SQL - and since is your homework, that's why it was given to you.
Here's a SQL reference that will give you what you need to know - but you will need to learn it:
SQL GROUP BY Statement[
^]
You'll have to understand it - not very difficult and translate it into VB.NET.