sql - ORA-00979: not a GROUP BY expression; don't understand why -
getting error ora-00979: not group expression. i'm not sure why happening. seems correct. missing blatantly obvious here?
select to_number(calot_awd_yr), calot_tpc, atcat_allot_nbr, atcat_tcat, sum(calot_amt_funded), atcat_c_or_d_ind myschema.stg_ted_clnt_allot_tab, myschema.stg_ted_allot_tcat calot_tpc = atcat_tpc , calot_awd_yr = atcat_awd_yr , calot_allot_nbr = atcat_allot_nbr , calot_tpc in ( 'dl' , 'pl' , 'th' ) group calot_awd_yr, calot_tpc, atcat_allot_nbr, atcat_tcat order calot_awd_yr, calot_tpc, atcat_allot_nbr, atcat_tcat;
you need group atcat_c_or_d_ind well
Comments
Post a Comment