原始sql语句,在mysql 正常执行
select
round(avg(APPRAISETEACHER), 1) as APPRAISETEACHER,
round(avg(APPRAISECOURSE), 1) as APPRAISECOURSE,
round(avg(APPRAISEFORM), 1) as APPRAISEFORM,
round(avg(APPRAISESATISFACTION), 1) as APPRAISESATISFACTION,
IS_DELETED
from
GBJYPX.zw_gbpx_appraise
where
IS_DELETED = '0'
但是迁移到mysql 报错SQL 错误 [40000]: ERROR, Attribute ZW_GBPX_APPRAISE.IS_DELETED must be GROUPed or used in an aggregate function
修改之后在神通可以正常使用
select
round(avg(APPRAISETEACHER), 1) as APPRAISETEACHER,
round(avg(APPRAISECOURSE), 1) as APPRAISECOURSE,
round(avg(APPRAISEFORM), 1) as APPRAISEFORM,
round(avg(APPRAISESATISFACTION), 1) as APPRAISESATISFACTION,
round(avg(IS_DELETED))
from
GBJYPX.zw_gbpx_appraise
where
IS_DELETED = '0'