Skip to content
Advertisement

how to find the average of first 3 rows using avg() function in MySQL

I have table called student, and which there is field of marks. i’m trying to get an average of first 3 marks.

I tried by following query,

and i got following output,

i’m expecting the output as 35.21953333333333

explanation, (34.8771+34.8282+35.9533)/3 = 35.21953333333333

Please help me with this.

Advertisement

Answer

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement