
SHOW DATABASES;
USE transportation;
CREATE TABLE orderdetails (
ID int NOT NULL AUTO_INCREMENT,
orderId int NOT NULL,
productId int NOT NULL,
quantityOrdered int NOT NULL,
priceEach decimal(10,2) NOT NULL,
PRIMARY KEY (ID),
FOREIGN KEY (orderId)
REFERENCES orders(ID),
FOREIGN KEY (productId)
REFERENCES products (ID)
ON UPDATE CASCADE
ON DELETE CASCADE
);
INSERT INTO orderdetails (ID, orderId, productId, quantityOrdered, priceEach) VALUES
(1,24,30,136.00),
(2,28,50,55.09),
(3,51,22,75.46),
(4,81,49,35.29),
(5,30,25,108.06),
(6,34,26,167.06),
(7,62,45,32.53),
(8,65,46,44.35),
(9,20,39,95.55),
(10,21,41,43.13),
(11,3,26,214.30),
(12,7,42,119.67),
(13,10,27,121.64),
(14,18,35,94.50),
(15,18,22,58.34),
(16,36,27,92.19),
(17,37,35,61.84),
(18,39,25,86.92),
(19,45,46,86.31),
(20,53,36,98.07),
(21,54,41,40.75),
(22,66,36,107.34),
(23,83,25,88.62),
(24,86,31,92.46),
(25,91,45,63.35),
(26,104,42,94.07),
(28,12,34,131.44),
(29,16,41,111.39),
(30,27,24,135.90),
(31,29,29,122.73),
(32,41,23,165.95),
(33,58,35,52.02),
(34,50,38,119.20),
(35,69,44,30.41),
(36,82,26,106.45),
(37,89,35,51.95),
(38,90,49,56.55),
(39,95,33,114.59),
(40,96,32,53.31),
(41,6,50,127.84),
(42,9,41,205.72),
(43,14,29,141.88),
(44,40,22,136.59),
(45,43,38,87.73),
(46,52,41,75.48),
(47,64,43,117.97),
(48,73,44,73.46),
(49,73,50,75.47),
(50,98,41,54.00),
(1,100,29,86.61),
(2,103,31,60.72),
(3,107,39,92.16),
(4,108,22,99.31),
(5,111,25,44.77),
(6,23,36,134.04),
(7,32,34,81.10),
(8,38,41,80.86),
(9,49,41,94.22),
(9,61,28,107.23),
(10,70,49,65.77),
(11,76,31,55.89),
(12,80,50,55.96),
(13,84,26,71.00),
(14,92,33,65.35),
(15,94,39,35.78),
(16,99,31,91.34),
(17,101,30,85.09),
(18,102,34,99.72),
(19,105,32,113.90),
(20,106,44,76.00),
(21,109,48,70.33),
(22,106,44,76.00),
(23,2,30,81.35),
(24,78,39,105.86),
(25,5,27,172.36),
(26,11,21,122.00),
(27,33,29,52.70),
(28,59,25,96.92),
(29,28,50,55.09),
(30,66,36,107.34),
(31,59,25,96.92),
(32,53,36,98.07),
(33,11,21,122.00),
(34,59,25,96.92),
(35,106,44,76.00),
(36,59,25,96.92),
(37,16,41,111.39),
(38,59,25,96.92),
(39,61,28,107.23),
(40,59,25,96.92),
(41,94,39,35.78),
(42,106,44,76.00),
(43,59,25,96.92),
(44,80,50,55.96),
(45,70,49,65.77),
(46,80,50,55.96),
(47,99,31,91.34),
(48,59,25,96.92),
(49,78,39,105.86),
(50,63,38,73.12);