笔者今天写了一个sql奇怪的是在本机测试环境运行正常而在linux环境中报出:
this is incompatible with sql_mode=only_full_group_by
sql如下:
select id ,min(actual_price) as price ,goods_id from sc_goods_norm GROUP BY goods_id
本机运行:
正常查询出结果:
远程linux环境同一条sql,查询:
通过资料查询,将sql加上any_value( ),不通过检测就可以了;
sql改成了如下,正常了,特此记录
select any_value(id) as id , any_value(min(actual_price)) as price ,goods_id from sc_goods_norm GROUP BY goods_id