09:19:18 select distinct p.productName, c.categoryName, count(o.orderid) from categories c join products p on p.categoryid = c.categoryid join order_details od on p.productid = od.productid join mydb.order o on o.orderid =od.orderid group by p.productName LIMIT 0, 1000 Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mydb.c.CategoryName' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 0.000 sec
첫댓글 SET SESSION sql_mode =
'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'