ORA-00978

Error: ORA-00978: nested group function without GROUP BY

Causa: A group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, was used within another group function, as in MAX(COUNT(*)), without a corresponding GROUP BY clause.

Acción: Either add a GROUP BY clause or remove the extra level of nesting.

COMENTARIOS:

por Anónimo | 11/09/2006 22:51:19

RE: ORA-00978

select c.name,sum(i.price * i.quantity) ,r.name
from s_customer c,s_ord o,s_item i,s_region r
where c.id = o.customer_id
and o.id = i.ord_id
and c.region_id = r.id
group by c.name,r.name
having sum(i.price * i.quantity) = (select max(sum(i.price * i.quantity))
from s_item i
where i.ord_id = o.id
and c.id = o.customer_id)