# Finding the frequency of each unique value of an attribute in a relation (RELATIONAL ALGEBRA)

I am trying to figure out how I can use aggregate functions to solve this problem. For example if I had the table

enrolled(student-id, course-id)
123 897
123 645
589 452
009 897

If I wanted to find the number of courses each student is enrolled in, how would I go about doing that? I was thinking of using the count function but I don't know how to separate each student-id

• You could use the group by operator. – Renzo Feb 13 '19 at 15:33