奇怪的GROUP BY错误
在oracle中输入语句
select o.name
from orders o, part p
group by o.name
having o.partnum = p.partnum
and o.quantity * p.price > avg(o.quantity * p.price);
就会报这样的错
and o.quantity * p.price > avg(o.quantity * p.price)
*
ERROR at line 5:
ORA-00979: not a GROUP BY expression
为什么会报这样的错呢?