Gossamer Forum
Home : General : Databases and SQL :

ORA-00979: not a GROUP BY expression

Quote Reply
ORA-00979: not a GROUP BY expression
I get the not a GROUP BY expression error with the following query, can someone help me please?

Select ocp.contract_id,
ocp.begin_date,
ocp.end_date,
ocp.amount,
ocp.confirmed,
ocp.last_updated_date,
oc.market_service,
oc.service_type,
oc.contract_type
from sms_owner.contract_t oc,
sms_owner.contract_profile_t ocp
where ocp.contract_id = oc.contract_id and
ocp.begin_date = oc.begin_date and
ocp.end_date = oc.end_date and
ocp.confirmed = oc.confirmed and
ocp.last_updated_date = oc.last_updated_date and
oc.market_service = '0' and
oc.service_type = 'RT'
group by ocp.amount,
oc.market_service,
oc.service_type,
oc.contract_type
order by 1,6
Quote Reply
Re: [gdub] ORA-00979: not a GROUP BY expression In reply to
You have no aggregator functions (count, sum, min, max, etc) in your select. Why are you doing a group by?

Cheers,

Alex
--
Gossamer Threads Inc.