I’m wondering if there’s a simple way to do the following. Essentially, I want to do an equivalent of a sum() on a character field, to get a list of its values. Say I have a classes table like:
ClassName TeacherID Students Econ 101 1 50 Econ 102 1 30 Calc 201 2 22
I want to get a summary result of the classes for each teacher, like:
TeacherID Classes 1 Econ 101 Econ 102 2 Calc 201
Is there anything similar to a select TeacherID, sum(Students) group by 1 or does it need to be more complicated?