I have sample data
11, John, CS101, enrol,1,2000-01-01,2000-03-31
11, John, CS101, grant,2,2000-04-01,2000-04-30
11, John, CS101, cancel,3,2000-04-01,2000-04-30
11, John, PHIL, enrol, 1, 2000-02-01,2000-03-31
11, John, PHIL, grant, 2, 2000-04-01,2000-04-30
Here the columns represent number of actions, student name, their course names, course action- enroll, cancel or grant and the from-to dates for filtering purpose. There is a need for adding the number for distinct student and course, the composite key . How to add this to the code?