ORA-00979: not a GROUP BY expression
problem query
select class_schedule.class_id, class_schedule.sum(class_schedule.enrolments) tot_enr, class.name from class_schedule inner join class on class_schedule.class_id = class.id group by class_schedule.class.id
solution
select class_schedule.class_id,
sum(class_schedule.enrolments) tot_enr, class.name
from class_schedule
inner join
class on class_schedule.class_id = class.id
group by class_schedule.class_id, class.name
No comments:
Post a Comment