CREATE TABLE Products (
    prod_id int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    prod_name varchar(127),
    prod_img varchar(127),
    prod_description varchar(511),
    prod_price DECIMAL(10,2),
    prod_rating TINYINT UNSIGNED,
    prod_sku char(32),
    prod_stock int UNSIGNED
);

INSERT INTO Products (prod_name, prod_img, prod_description, prod_price, prod_rating, prod_sku, prod_stock) VALUES 
   ('Tower', 'tower.jpg', 'CM Stormtrooper FUll Tower', '180.34', '5', 'JF453LJ', '1'),
   ('Monitor', 'monitor.jpg', 'Asus 24\" Full HD Gaming Monitor', '279.99', '4', 'VG248QE', '4'),
   ('GPU', 'gpu.jpg', 'Asus Radeon HD 7990', '424.24', '1', 'EOA2347', '0'),
   ('CPU', 'cpu.jpg', 'Intel Core i7-7700', '374.99', '2', 'LAI41KS', '7'),
   ('PSU', 'psu.jpg', 'EVGA 850G2 Power Supply', '180.41', '4', '3J44LQ0', '2'),
   ('Memory', 'memory.jpg', 'Corsair Vengeance 16GB DDR4', '139.99', '3', 'NVB2NN3', '5');

-- Sort Rating
--SELECT * FROM Products;
--ORDER BY prod_rating;

-- Sort Price Low to High;
--SELECT * FROM Products
--ORDER BY prod_price ASC;

-- Sort Price High to Low;
--SELECT * FROM Products;
--ORDER BY prod_price DESC;
