题目描述
https://www.nowcoder.com/practice/979b1a5a16d44afaba5191b22152f64a
思路:题目要求不去重显示,如果直接在where中使用university=‘山东大学’ or gender='male’的话,结果是去重的,使用union也是去重的,所以需要使用union all
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'