ORA-00979 not a group by expression

后端 未结 8 1802
梦谈多话
梦谈多话 2020-11-21 04:33

I am getting ORA-00979 with the following query:

SELECT cr.review_sk, cr.cs_sk, cr.full_name,
tolist(to_char(cf.fact_date, \'mm/dd/yyyy\')) \"appt\",
cs.cs_i         


        
8条回答
  •  猫巷女王i
    2020-11-21 05:02

    In addition to the other answers, this error can result if there's an inconsistency in an order by clause. For instance:

    select 
        substr(year_month, 1, 4)
        ,count(*) as tot
    from
        schema.tbl
    group by
        substr(year_month, 1, 4)
    order by
        year_month
    

提交回复
热议问题