Skip to content

๐Ÿ—„๏ธ Students per class

Easy Apply ๐Ÿ’ป Computational Thinking ๐Ÿ“Š Data and Analytical Thinking โฑ about 10 minutes 2 tests (1 shown)

Problem

How many students are in each class? Return the class and the number of students, ordered by class.

You will learn: Aggregate with GROUP BY and COUNT.

Tables:

  • students (id, name, class, score)
  • fees (student_id, amount_paid)

Examples

Input: students table (6 rows)

Output: S1 | 2 S2 | 2 S3 | 2

Hints

โœ“ Verified Submissions are checked against all tests, including hidden ones.

โ–ถ Runs in your browser Run checks the example tests in your browser. Verified grading with hidden tests needs the secure runner, which is not set up yet โ€” submissions are saved as practice, with no score.

Not available yet Code execution for this language is not available yet: the secure code runner has not been set up. You can write and save your code and compare it with the worked solution, but it will not be run.

Loading editorโ€ฆ

Run is unavailable for this language until the secure runner is set up.

Example tests (ran in your browser)

Stuck? Read the failing case carefully, compare the expected and actual values, then try a hint. (AI debugging help is not configured on this server.)