I have a table of Student which has fields
ID | Name | Class |
---------------------------------
1 | One | Class1 |
2 | Two | Class2 |
3 | Three | Class1 |
I want to get the count of students for each class in a single Query. Like.
Class | Count |
---------------------
Class1 | 2 |
Class2 | 1 |