select device_id, gender, age, university, gpa from user_profile where id in ( select id from user_profile where university = '北京大学' union select id from user_profile where gpa > 3.7 ); 使用返回只返回id的子查询,避免InnoDB的回表查询,提高查询效率