mysql下这种select 怎么写?不懂就问:

img


筛选 haoping 和chuzhen 存在 同时大于60的name
这种代码应该怎么写,筛选出 haoping 和 chunzhen 同时大于60的名字,存在就要筛选出

select a.* from
(select name from ouppatient where item='haoping' and amount>60) as a
left join (select name from ouppatient where item='chuzhen' and amount>60) as b
on a.name=b.name
where b.name is not null


select * from ouppatient where item in('haoping','chuzhen') and amount>60

select name from ouppatient where (item = 'haoping' or item = 'chuzhen') and amount>60

同一个人需要 存在 haoping 和chuzhen 同时大于60才输出名字 ,or 没同时,应该怎么写