查询所有分类 group by 报错 this is incompatible with sql _mode=only_full_group_by
语句:mysql> SELECT p.type_id,p.type_name,count(s.type_name) AS children_coun F
ROM tdb_goods_types AS p LEFT JOIN tdb_goods_types AS s ON s.parent_id = p
.type_id GROUP BY p.type_name ORDER BY p.type_id;
错误:ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause
and contains nonaggregated column 'test.p.type_id' which is not functiona
lly dependent on columns in GROUP BY clause; this is incompatible with sql
_mode=only_full_group_by