# Order by a column that is not in GROUP BY and SELECT parts # should be correct. --disable_warnings DROP DATABASE IF EXISTS MCOL5772; --enable_warnings CREATE DATABASE MCOL5772; USE MCOL5772; CREATE TABLE products ( product_id INT, product_name VARCHAR(100), category VARCHAR(50), unit_price DECIMAL(10, 2), stock_quantity INT ) ENGINE=Columnstore; INSERT INTO products VALUES (1, 'Laptop', 'Electronics', 1200.00, 50), (2, 'Smartphone', 'Electronics', 800.00, 100), (3, 'Coffee Maker', 'Appliances', 50.00, 30), (4, 'Backpack', 'Fashion', 40.00, 80), (5, 'Desk Chair', 'Furniture', 150.00, 20); SELECT product_name, SUM(stock_quantity) AS total_stock FROM products GROUP BY category ORDER BY stock_quantity; DROP DATABASE MCOL5772;