I have 3 tables; Group, MemberOfGroup and Graduates. GroupID is a primary key for Group and MatricNo is a primary key for Graduates. Both GroupID and MatricNo are composite key for MemberOfGroup. I want to show the group lists according to member size. Below is my sql.
Select g.GroupName, count(m.MatricNo) AS "Member Size"
from Group g, MemberOfGroup m
where g.GroupID=m.GroupID;
But I am getting error saying this was wrong. I have tried in many ways, including "group by" but still getting error. Please guide me what was wrong.
Thanks ahead.