Classes with Max Students

ASKED IN INTERVIEW
2pts
Canvas

Problem Statement

Educational institutions use Canvas to manage course loads. You need to identify which class had the highest enrollment during the Fall semester.

Rules:

  • Only consider courses where the semester is recorded as Fall.
  • If multiple classes have the same maximum enrollment, any one of them is acceptable.
  • Output column: class_name.
Tests your understanding of
Grouping, Aggregation and Filtering

Input Tables

Courses
class_id(INTEGER)class_name(VARCHAR)semester(VARCHAR)
1AlgorithmsFall
2Data StructuresSpring
3Machine LearningFall
4SQL SystemsFall
Enrollments
enrollment_id(INTEGER)class_id(INTEGER)student_id(INTEGER)
101150
102151
103352
104453
105454
106455
Professors
professor_id(INTEGER)class_id(INTEGER)name(VARCHAR)
2011Dr. Smith
2024Dr. Jones

Expected Output

class_name(VARCHAR)
SQL Systems

Tags

EasyASKED IN INTERVIEWGroupingAggregationFiltering
10-15 min
79%

Hints