Given table 'st_marks':
rollno name marks 1 Shagun 85 2 Sukhi 63 3 Zoya 86 4 Irfan NULL 5 Maya 52
Find the output:
SELECT AVG(marks) FROM st_marks;
Given table 'st_marks':
| rollno | name | marks |
|---|---|---|
| 1 | Shagun | 85 |
| 2 | Sukhi | 63 |
| 3 | Zoya | 86 |
| 4 | Irfan | NULL |
| 5 | Maya | 52 |
Find the output:
SELECT AVG(marks) FROM st_marks;
Solution
✅ Correct Option: 4
AVG() ignores NULL values, so Irfan's row is left out of both the sum and the count. Only 4 marks are used.
Related questions:
2025: 27 May Shift 2
2025: 13 May Shift 2
2026: 18 May Shift 2
2025: 14 May Shift 1
2026: 11 May Shift 2