0
为什么说这种说法适用于自己的,但是当它是一个子查询的一部分,它说无效使用组功能为什么在子查询中这个MySQL语句不工作?
select count(cid)
from qualification q
inner join faculty f
on q.fid=f.fid
where fname='Berry'
group by
f.fid;
的我会怎样修改,以适合子查询?
整个查询 -
select fid, fname from faculty
where fid in
(select fid from qualification where count(cid)=
(select count(cid) from qualification q inner join faculty f on
q.fid=f.fid where fname='Berry' group by f.fid));
逻辑:列表FNAME和所有教职员工谁可以教所有贝里教授能教
你能显示整个查询吗? – 2014-03-27 07:59:20
聚合函数过滤器必须与'HAVING'而非'WHERE'一起使用 –