Skip
Arish's avatar

75. Practice - AVG with Conditions


Exercise: Filtered Average

Find average of distinct ages between 8 and 13.

Solution

sql
1SELECT AVG(DISTINCT age) FROM students
2WHERE age BETWEEN 8 AND 13;