Your question is SQL: Highest Marks Per Department. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Practo's internal learning dashboard needs to identify the strongest students in each academic department. Write a PostgreSQL query that returns every student whose marks are the highest in their department.
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Name of the academic department |
| Column | Type | Description |
|---|---|---|
| student_idPK | INT | Unique student identifier |
| student_name | VARCHAR(100) | Student's full name |
| department_id | INT | References departments.department_id |
| marks | INT | Student marks, potentially unrecorded |