使用count计算数量,使用avg函数计算平均值,使用round函数保留小数位数为1

SELECT COUNT(gender) as male_num,ROUND(AVG(gpa),1) as avg_gpa from user_profile where gender='male';