I have the following data: TEACHER_ID CLASS_ID X T1 C1 4 T1 C1 3 T1 C2 3 T1 C2 3 T1 C2 4 T1 C3 2 T1 C3 3 T2 C4 4 T2 C4 4 T2 C4 3 T2 C4 2 T2 C5 2 T2 C5 2 There are two teachers: T1, T2. T1 teaches three classes (C1, C2, and C3). In C1, there are 2 students, in C2, there are 3 students, and n C3, there are 2 students, T2 teaches two classes (C4, and C5). In C4, there are 4 students, in C5, there are 2 students, X is the score. Now, how do I write a program to calculate number of classes and number of students taught by each teacher? and create a new data set as follows: TEACHER_ID Nclass Nstudents T1 3 7 T2 2 6
... View more