select count(distinct device_id) male_num, avg(gpa) avg_gpa
from user_profile
where gender='male';