Question: I am getting these errors for almost every script mysql > SELECT sku AS PRODUCT _ SKU, description AS PRODUCT _ DESCRIPTION, - > COUNT

I am getting these errors for almost every script
mysql> SELECT sku AS PRODUCT_SKU, description AS PRODUCT_DESCRIPTION,
-> COUNT(*) AS RETURN_FREQUENCY
-> FROM Orders INNER JOIN RMA ON Orders.OrderID = RMA.OrderID
-> GROUP BY PRODUCT_SKU
-> ORDER BY RETURN_FREQUENCY DESC;
ERROR 1055(42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'QuantigrationUpdates.Orders.Description' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
mysql> SELECT COUNT(*) AS RETURNED_AMOUNT,
-> Orders.SKU AS PRODUCT_SKU,
-> Orders.Description AS PRODUCT_DESCRIPTION
-> FROM Orders INNER JOIN RMA ON Orders.OrderID = RMA.OrderID
-> GROUP BY PRODUCT_SKU
-> ORDER BY RETURNED_AMOUNT DESC
-> LIMIT 10;
ERROR 1055(42000): Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'QuantigrationUpdates.Orders.Description' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
I am working on DAD 220 Project 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!