没错吧 要不你写成连接形式的不要嵌套的试下
select *
from doctor a doctororder b
where doctororderb.个数>5 and doctor a.编号=doctororder b.被预定医师编号
doctor a
doctor a 和doctororder b是表名???那应该是where doctor a.编号
where doctororder b.个数>5吧
select 被预定医师编号 from doctororder
haiving count(被预定医师编号) >5
是要表达这个意思吗
把超过5次的被预定医师编号提出来
?