Your question is Average Grade Per Subject. Start with the requirements and the three 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.
Adobe Learning Manager stores student assessments by subject. Write a PostgreSQL query that reports the average grade for every subject, considering only grades submitted by active students.
| Column | Type | Description |
|---|---|---|
| student_idPK | INT | Unique student identifier |
| student_name | VARCHAR(100) | Student's display name |
| is_active | BOOLEAN | Whether the student is currently active |
| Column | Type | Description |
|---|---|---|
| subject_idPK | INT | Unique subject identifier |
| subject_name | VARCHAR(100) | Subject name |
| Column | Type | Description |
|---|---|---|
| grade_idPK | INT | Unique grade record identifier |
| student_id | INT | References students.student_id |
| subject_id | INT | References subjects.subject_id |
| score | NUMERIC(5,2) | Submitted grade |