Often see people are using group by and join for the same problem, suppose I have a student table and score table, want to find student name with related course score. It seems we can resolve this problem by either using join, or using group by? Wondering pros and cons for the two solutions. Post data structure and code below. Thanks.
table students:
student ID, student name, student email address
score table:
student ID, course ID, score
student_scores = group students by (studentId) inner, scores by (studentId);
student_scores = join students by student Id, scores by studentId;