结果不去重就用union all,去重就用 union。 where university='山东大学' or gender="male"的话,也是去重的。

select device_id,gender,age,gpa from user_profile
where university='山东大学' 
union all
select device_id,gender,age,gpa from user_profile
where gender='male';