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
曾经蜡笔没有小新2017-07-07 10:37:36
Your current sql_mode does not allow non-aggregated fields to appear in the form of non-aggregated functions. Just change sql_mode, or min(id) takes the first row of records and then connects to the original table to get the results you want