I am trying to run the following query:
select distinct inc_major_sc,inc_cat_sc from inc_cat
inner join inc_major on inc_major.inc_major_id = inc_cat.inc_major_id
where inc_cat_sc not in
((select
inc_cat.inc_cat_sc
from
inc_cat inner join incident on incident.cause_id = inc_cat.inc_cat_id
where
inc_cat.inc_cat_id <> 0)
union
(select
inc_cat.inc_cat_sc
from
inc_cat inner join incident on incident.inc_cat_id = inc_cat.inc_cat_id
where
inc_cat.inc_cat_id <> 0))
GROUP BY inc_major.inc_major_sc

I am getting this error:
Msg 8120, Level 16, State 1, Line 1
Column 'inc_cat.inc_cat_sc' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

What exactly is this error telling me and how do I group this by the inc_major_sc?

Thanks in advance for your assistance,
Di-