After the aggregate function, needed to rename the columns to Activity and SubjectID