By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 14.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit |
| id | student | max_score | year_1 | year_2 | year_3 | year_4 | year_5 |
|---|---|---|---|---|---|---|---|
| 1 | Alex | 7 | null | 7 | 7 | null | 7 |
| 2 | Bruno | 10 | 10 | 7 | 10 | 9 | 10 |
| 3 | Charlie | 7 | 7 | 5 | null | 7 | 7 |