SELECT count(*) ,  sex FROM student WHERE age  >  (SELECT avg(age) FROM student) GROUP BY sex
Find the number of students whose age is older than the average age for each gender.
SELECT count ( * ) , sex FROM student WHERE age > ( SELECT avg ( age ) FROM student ) GROUP BY sex
select count ( * ) , sex from student where age > ( select avg ( age ) from student ) group by sex
Find the number of students whose age is older than the average age for each gender .