title: Calculate number of students per class without using a JOIN
body: <p>I tried to run this query on MySQL workbench if I removed the GROUP BY condition it outputs the table of the data with the total number of students in all classes. I need the total per class WITHOUT USING JOIN AS THIS IS TRAINING ON SUBQUERY </p>
  
  <pre><code>SELECT Class.ID,Class.Name,Class.Description,Class.Code,Class.MaximumStudents,
   (SELECT COUNT(StudentID) AS numberOfStudentinClass 
    FROM ClassStudent 
    GROUP BY CLASSID) AS NumberOFStudentPerClass 
  FROM Class;
  </code></pre>
  
  <p>Here is the screenshot of the query and the result</p>
  
  <p><img src="https://i.imgur.com/wh0bStd.png" alt="Imgur"></p>