select age,money from t1.gz group by age;
发现报错:Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 't1.gz.money' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你现在的sql_mode不允许有非聚合字段以非聚合函数的形式出现,改一下sql_mode即可,或者min(id)取第一行记录再连接原表获取你要的结果