mysql group by error

nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error of sql : SELECT COUNT(1) FROM ( SELECT SUM(spl.out_total) outTotal, sp.*, spl.waybill_no waybillNo FROM sto_warehousing_plan sp LEFT JOIN sto_warehousing_plandtl spl ON sp.id = spl.plan_id LEFT JOIN sto_sku ss ON spl.sku_id = ss.id WHERE sp.is_deleted = '0' AND spl.is_deleted = '0' GROUP BY sp.id ORDER BY sp.update_time DESC ) TOTAL ### The error may exist in class path resource [mapper/StoWarehousingPlanMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error of sql : SELECT COUNT(1) FROM ( SELECT SUM(spl.out_total) outTotal, sp.*, spl.waybill_no waybillNo FROM sto_warehousing_plan sp LEFT JOIN sto_warehousing_plandtl spl ON sp.id = spl.plan_id LEFT JOIN sto_sku ss ON spl.sku_id = ss.id WHERE sp.is_deleted = '0' AND spl.is_deleted = '0' GROUP BY sp.id ORDER BY sp.update_time DESC ) TOTAL

 

 

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

posted @ 2022-06-15 20:39  McKay  阅读(176)  评论(0编辑  收藏  举报