Need suggestions on a MS SQL query:
table: students
id name class
-- ---- -----
1 John Math, Biology
2 Jane English
3 Mark Math
table: class
id name
-- ----
1 Math
2 English
3 Biology
4 History
Desired output
name count
---- -----
Math 2
English 1
Biology 1
History 0