Skip to main contentSkip to solution

Given table 'st_marks':

rollnonamemarks
1Shagun85
2Sukhi63
3Zoya86
4IrfanNULL
5Maya52

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.

AVG(marks)=85+63+86+524=2864=71.5\text{AVG(marks)} = \dfrac{85 + 63 + 86 + 52}{4} = \dfrac{286}{4} = \boxed{71.5}

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question