-- Creazione della tabella Clienti
CREATE TABLE Clienti (
    IDCliente INT PRIMARY KEY,
    Nome VARCHAR(50),
    Cognome VARCHAR(50),
    Email VARCHAR(100),
    NumeroTelefono VARCHAR(20)
);

-- Creazione della tabella Ordini
CREATE TABLE Ordini (
    IDOrdine INT PRIMARY KEY,
    IDCliente INT,
    DataOrdine DATE,
    FOREIGN KEY (IDCliente) REFERENCES Clienti(IDCliente)
);

-- Creazione della tabella Prodotti
CREATE TABLE Prodotti (
    IDProdotto INT PRIMARY KEY,
    NomeProdotto VARCHAR(100),
    PrezzoUnitario DECIMAL(10, 2)
);

-- Creazione della tabella DettagliOrdine
CREATE TABLE DettagliOrdine (
    IDDettaglio INT PRIMARY KEY,
    IDOrdine INT,
    IDProdotto INT,
    Quantita INT,
    FOREIGN KEY (IDOrdine) REFERENCES Ordini(IDOrdine),
    FOREIGN KEY (IDProdotto) REFERENCES Prodotti(IDProdotto)
);

-- Inserimento di 20 clienti casuali
INSERT INTO Clienti (IDCliente, Nome, Cognome, Email, NumeroTelefono)
VALUES
    (1, 'Alice', 'Rossi', 'alice@email.com', '123-456-7890'),
    (2, 'Bob', 'Verdi', 'bob@email.com', '987-654-3210'),
    (3, 'Charlie', 'Bianchi', 'charlie@email.com', '555-123-4567'),
    (4, 'David', 'Neri', 'david@email.com', '111-222-3333'),
    (5, 'Emma', 'Gialli', 'emma@email.com', '444-555-6666'),
    (6, 'Federico', 'Blu', 'federico@email.com', '777-888-9999'),
    (7, 'Giulia', 'Verdi', 'giulia@email.com', '222-333-4444'),
    (8, 'Hannah', 'Neri', 'hannah@email.com', '555-666-7777'),
    (9, 'Ivan', 'Bianchi', 'ivan@email.com', '888-999-0000'),
    (10, 'Jessica', 'Rossi', 'jessica@email.com', '123-234-3456'),
    (11, 'Kevin', 'Gialli', 'kevin@email.com', '567-678-7890'),
    (12, 'Laura', 'Blu', 'laura@email.com', '789-890-1234'),
    (13, 'Marco', 'Verdi', 'marco@email.com', '432-543-6543'),
    (14, 'Natalie', 'Bianchi', 'natalie@email.com', '876-987-0987'),
    (15, 'Oscar', 'Neri', 'oscar@email.com', '234-345-4567'),
    (16, 'Paola', 'Rossi', 'paola@email.com', '678-789-8901'),
    (17, 'Quincy', 'Gialli', 'quincy@email.com', '321-432-5432'),
    (18, 'Rita', 'Blu', 'rita@email.com', '987-876-7654'),
    (19, 'Samuel', 'Verdi', 'samuel@email.com', '543-654-7654'),
    (20, 'Tina', 'Bianchi', 'tina@email.com', '987-876-7654');

-- Inserimento di 30 prodotti con nomi da supermercato
INSERT INTO Prodotti (IDProdotto, NomeProdotto, PrezzoUnitario)
VALUES
    (1, 'Latte', 1.99),
    (2, 'Pane', 2.49),
    (3, 'Uova', 3.29),
    (4, 'Pasta', 1.79),
    (5, 'Riso', 2.99),
    (6, 'Pollo', 6.99),
    (7, 'Pomodori', 0.89),
    (8, 'Banane', 0.49),
    (9, 'Biscotti', 2.99),
    (10, 'Acqua', 0.99),
    (11, 'Yogurt', 1.29),
    (12, 'Formaggio', 4.49),
    (13, 'Insalata', 1.79),
    (14, 'Salmone', 9.99),
    (15, 'Miele', 3.59),
    (16, 'Cereali', 3.99),
    (17, 'Caffè', 5.79),
    (18, 'Carne', 2.29),
    (19, 'Pancetta', 4.99),
    (20, 'Patate', 1.19),
    (21, 'Mele', 0.69),
    (22, 'Carote', 0.89),
    (23, 'Passata', 1.49),
    (24, 'Salsiccia', 3.99),
    (25, 'Cioccolato', 2.79),
    (26, 'Cipolle', 0.79),
    (27, 'Cornetto', 2.99),
    (28, 'Sapone', 1.99),
    (29, 'Dentifricio', 2.29),
    (30, 'Gelato', 4.49);

-- Inserimento di 30 ordini casuali con varietà di date
INSERT INTO Ordini (IDOrdine, IDCliente, DataOrdine)
VALUES
    (1, 1, '2023-01-05'),
    (2, 2, '2023-02-15'),
    (3, 3, '2023-03-20'),
    (4, 4, '2023-04-10'),
    (5, 5, '2023-05-25'),
    (6, 6, '2023-06-18'),
    (7, 7, '2023-07-09'),
    (8, 8, '2023-01-29'),
    (9, 9, '2023-02-14'),
    (10, 10, '2023-03-01'),
    (11, 11, '2023-04-17'),
    (12, 12, '2023-05-22'),
    (13, 13, '2023-06-07'),
    (14, 14, '2023-07-03'),
    (15, 15, '2023-01-10'),
    (16, 16, '2023-02-27'),
    (17, 17, '2023-03-14'),
    (18, 18, '2023-04-19'),
    (19, 19, '2023-05-30'),
    (20, 20, '2023-06-11'),
    (21, 1, '2023-07-28'),
    (22, 2, '2023-01-16'),
    (23, 3, '2023-02-22'),
    (24, 4, '2023-03-27'),
    (25, 5, '2023-04-05'),
    (26, 6, '2023-05-12'),
    (27, 7, '2023-06-29'),
    (28, 8, '2023-07-07'),
    (29, 9, '2023-01-25'),
    (30, 10, '2023-02-18');

-- Inserimento di ulteriori 30 ordini casuali con varietà di date
INSERT INTO Ordini (IDOrdine, IDCliente, DataOrdine)
VALUES
    (31, 11, '2023-02-05'),
    (32, 12, '2023-03-15'),
    (33, 13, '2023-04-20'),
    (34, 14, '2023-05-10'),
    (35, 15, '2023-06-25'),
    (36, 16, '2023-07-18'),
    (37, 17, '2023-08-09'),
    (38, 18, '2023-02-28'),
    (39, 19, '2023-03-14'),
    (40, 20, '2023-04-01'),
    (41, 1, '2023-05-17'),
    (42, 2, '2023-06-22'),
    (43, 3, '2023-07-07'),
    (44, 4, '2023-08-04'),
    (45, 5, '2023-02-11'),
    (46, 6, '2023-03-29'),
    (47, 7, '2023-04-13'),
    (48, 8, '2023-05-21'),
    (49, 9, '2023-06-02'),
    (50, 10, '2023-07-12'),
    (51, 11, '2023-08-27'),
    (52, 12, '2023-02-17'),
    (53, 13, '2023-03-23'),
    (54, 14, '2023-04-26'),
    (55, 15, '2023-05-07'),
    (56, 16, '2023-06-14'),
    (57, 17, '2023-07-25'),
    (58, 18, '2023-08-10'),
    (59, 19, '2023-02-19'),
    (60, 20, '2023-03-31');

    -- Inserimento di altri 30 ordini casuali con varietà di date
INSERT INTO Ordini (IDOrdine, IDCliente, DataOrdine)
VALUES
    (61, 1, '2023-03-05'),
    (62, 2, '2023-04-15'),
    (63, 3, '2023-05-20'),
    (64, 4, '2023-06-10'),
    (65, 5, '2023-07-25'),
    (66, 6, '2023-08-18'),
    (67, 7, '2023-03-09'),
    (68, 8, '2023-04-28'),
    (69, 9, '2023-05-04'),
    (70, 10, '2023-06-14'),
    (71, 11, '2023-07-21'),
    (72, 12, '2023-08-26'),
    (73, 13, '2023-03-03'),
    (74, 14, '2023-04-29'),
    (75, 15, '2023-05-15'),
    (76, 16, '2023-06-20'),
    (77, 17, '2023-07-02'),
    (78, 18, '2023-08-19'),
    (79, 19, '2023-03-24'),
    (80, 20, '2023-04-08'),
    (81, 1, '2023-05-26'),
    (82, 2, '2023-06-13'),
    (83, 3, '2023-07-17'),
    (84, 4, '2023-08-12'),
    (85, 5, '2023-03-08'),
    (86, 6, '2023-04-19'),
    (87, 7, '2023-05-21'),
    (88, 8, '2023-06-27'),
    (89, 9, '2023-07-04'),
    (90, 10, '2023-08-10');

-- Inserimento di 30 ordini casuali con varietà di date
INSERT INTO Ordini (IDOrdine, IDCliente, DataOrdine)
VALUES
    (91, 1, '2023-01-10'),
    (92, 2, '2023-02-15'),
    (93, 3, '2023-03-20'),
    (94, 4, '2023-04-10'),
    (95, 5, '2023-05-25'),
    (96, 6, '2023-06-18'),
    (97, 7, '2023-07-09'),
    (98, 8, '2023-01-29'),
    (99, 9, '2023-02-14'),
    (100, 10, '2023-03-01'),
    (101, 11, '2023-04-17'),
    (102, 12, '2023-05-22'),
    (103, 13, '2023-06-07'),
    (104, 14, '2023-07-03'),
    (105, 15, '2023-01-10'),
    (106, 16, '2023-02-27'),
    (107, 17, '2023-03-14'),
    (108, 18, '2023-04-19'),
    (109, 19, '2023-05-30'),
    (110, 20, '2023-06-11'),
    (111, 1, '2023-07-28'),
    (112, 2, '2023-01-16'),
    (113, 3, '2023-02-22'),
    (114, 4, '2023-03-27'),
    (115, 5, '2023-04-05'),
    (116, 6, '2023-05-12'),
    (117, 7, '2023-06-29'),
    (118, 8, '2023-07-07'),
    (119, 9, '2023-01-25'),
    (120, 10, '2023-02-18');

-- Inserimento di 20 dettagli ordine completi
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (1, 91, 1, 2),
    (2, 91, 5, 1),
    (3, 92, 12, 3),
    (4, 92, 18, 2),
    (5, 93, 4, 1),
    (6, 93, 9, 5),
    (7, 94, 2, 1),
    (8, 94, 7, 3),
    (9, 95, 15, 2),
    (10, 95, 20, 1),
    (11, 96, 6, 2),
    (12, 96, 13, 1),
    (13, 97, 8, 3),
    (14, 97, 11, 2),
    (15, 98, 17, 1),
    (16, 98, 19, 1),
    (17, 99, 3, 2),
    (18, 99, 14, 1),
    (19, 100, 10, 3),
    (20, 100, 16, 3);

-- Inserimento di ulteriori 20 dettagli ordine completi
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (21, 101, 2, 2),
    (22, 101, 7, 1),
    (23, 102, 16, 3),
    (24, 102, 20, 2),
    (25, 103, 4, 1),
    (26, 103, 9, 5),
    (27, 104, 3, 1),
    (28, 104, 14, 3),
    (29, 105, 10, 2),
    (30, 105, 18, 1),
    (31, 106, 5, 2),
    (32, 106, 12, 1),
    (33, 107, 1, 3),
    (34, 107, 6, 2),
    (35, 108, 11, 1),
    (36, 108, 15, 1),
    (37, 109, 8, 2),
    (38, 109, 13, 3),
    (39, 110, 17, 1),
    (40, 110, 19, 1);

-- Inserimento di ulteriori 20 dettagli ordine completi
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (41, 111, 3, 2),
    (42, 111, 8, 1),
    (43, 112, 15, 3),
    (44, 112, 20, 2),
    (45, 113, 4, 1),
    (46, 113, 7, 5),
    (47, 114, 2, 1),
    (48, 114, 9, 3),
    (49, 115, 10, 2),
    (50, 115, 14, 1),
    (51, 116, 12, 2),
    (52, 116, 18, 1),
    (53, 117, 1, 3),
    (54, 117, 6, 2),
    (55, 118, 17, 1),
    (56, 118, 19, 1),
    (57, 119, 11, 2),
    (58, 119, 16, 3),
    (59, 120, 5, 1),
    (60, 120, 13, 2);

-- Inserimento di ulteriori 20 dettagli ordine completi
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (61, 101, 6, 2),
    (62, 101, 11, 1),
    (63, 102, 14, 3),
    (64, 102, 18, 2),
    (65, 103, 1, 1),
    (66, 103, 5, 5),
    (67, 104, 10, 1),
    (68, 104, 15, 3),
    (69, 105, 9, 2),
    (70, 105, 16, 1),
    (71, 106, 3, 2),
    (72, 106, 7, 1),
    (73, 107, 13, 3),
    (74, 107, 17, 2),
    (75, 108, 2, 1),
    (76, 108, 8, 3),
    (77, 109, 12, 2),
    (78, 109, 19, 1),
    (79, 110, 4, 1),
    (80, 110, 20, 2);

-- Inserimento di ulteriori 20 dettagli ordine completi
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (81, 111, 5, 2),
    (82, 111, 10, 1),
    (83, 112, 16, 3),
    (84, 112, 19, 2),
    (85, 113, 2, 1),
    (86, 113, 8, 5),
    (87, 114, 3, 1),
    (88, 114, 11, 3),
    (89, 115, 15, 2),
    (90, 115, 20, 1),
    (91, 116, 4, 2),
    (92, 116, 9, 1),
    (93, 117, 1, 3),
    (94, 117, 6, 2),
    (95, 118, 12, 1),
    (96, 118, 18, 1),
    (97, 119, 13, 2),
    (98, 119, 17, 3),
    (99, 120, 7, 1),
    (100, 120, 14, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (101, 101, 2, 2),
    (102, 101, 7, 1),
    (103, 102, 16, 3),
    (104, 102, 20, 2),
    (105, 103, 4, 1),
    (106, 103, 9, 5),
    (107, 104, 3, 1),
    (108, 104, 11, 3),
    (109, 105, 15, 2),
    (110, 105, 20, 1),
    (111, 106, 6, 2),
    (112, 106, 13, 1),
    (113, 107, 8, 3),
    (114, 107, 11, 2),
    (115, 108, 17, 1),
    (116, 108, 19, 1),
    (117, 109, 3, 2),
    (118, 109, 14, 1),
    (119, 110, 10, 3),
    (120, 110, 16, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (121, 111, 5, 2),
    (122, 111, 10, 1),
    (123, 112, 16, 3),
    (124, 112, 19, 2),
    (125, 113, 2, 1),
    (126, 113, 8, 5),
    (127, 114, 3, 1),
    (128, 114, 11, 3),
    (129, 115, 15, 2),
    (130, 115, 20, 1),
    (131, 116, 6, 2),
    (132, 116, 13, 1),
    (133, 117, 8, 3),
    (134, 117, 11, 2),
    (135, 118, 17, 1),
    (136, 118, 19, 1),
    (137, 119, 3, 2),
    (138, 119, 14, 1),
    (139, 120, 7, 1),
    (140, 120, 14, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 140
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (141, 1, 7, 1),
    (142, 2, 16, 3),
    (143, 2, 20, 2),
    (144, 3, 4, 1),
    (145, 3, 9, 5),
    (146, 4, 3, 1),
    (147, 4, 11, 3),
    (148, 5, 15, 2),
    (149, 5, 20, 1),
    (150, 6, 6, 2),
    (151, 6, 13, 1),
    (152, 7, 8, 3),
    (153, 7, 11, 2),
    (154, 8, 17, 1),
    (155, 8, 19, 1),
    (156, 9, 3, 2),
    (157, 9, 14, 1),
    (158, 10, 10, 3),
    (159, 10, 16, 2),
    (160, 1, 2, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 161
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (161, 11, 10, 2),
    (162, 11, 16, 1),
    (163, 12, 6, 3),
    (164, 12, 13, 2),
    (165, 13, 8, 1),
    (166, 13, 11, 5),
    (167, 14, 17, 1),
    (168, 14, 19, 3),
    (169, 15, 3, 2),
    (170, 15, 14, 1),
    (171, 16, 10, 2),
    (172, 16, 16, 1),
    (173, 17, 6, 3),
    (174, 17, 13, 2),
    (175, 18, 8, 1),
    (176, 18, 11, 5),
    (177, 19, 17, 1),
    (178, 19, 19, 3),
    (179, 20, 3, 2),
    (180, 20, 14, 1);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 181
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (181, 21, 5, 2),
    (182, 21, 10, 1),
    (183, 22, 16, 3),
    (184, 22, 19, 2),
    (185, 23, 2, 1),
    (186, 23, 8, 5),
    (187, 24, 3, 1),
    (188, 24, 11, 3),
    (189, 25, 15, 2),
    (190, 25, 20, 1),
    (191, 26, 6, 2),
    (192, 26, 13, 1),
    (193, 27, 8, 3),
    (194, 27, 11, 2),
    (195, 28, 17, 1),
    (196, 28, 19, 1),
    (197, 29, 3, 2),
    (198, 29, 14, 1),
    (199, 30, 10, 3),
    (200, 30, 16, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 201
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (201, 31, 5, 2),
    (202, 31, 10, 1),
    (203, 32, 16, 3),
    (204, 32, 19, 2),
    (205, 33, 2, 1),
    (206, 33, 8, 5),
    (207, 34, 3, 1),
    (208, 34, 11, 3),
    (209, 35, 15, 2),
    (210, 35, 20, 1),
    (211, 36, 6, 2),
    (212, 36, 13, 1),
    (213, 37, 8, 3),
    (214, 37, 11, 2),
    (215, 38, 17, 1),
    (216, 38, 19, 1),
    (217, 39, 3, 2),
    (218, 39, 14, 1),
    (219, 40, 10, 3),
    (220, 40, 16, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 221
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (221, 41, 5, 2),
    (222, 41, 10, 1),
    (223, 42, 16, 3),
    (224, 42, 19, 2),
    (225, 43, 2, 1),
    (226, 43, 8, 5),
    (227, 44, 3, 1),
    (228, 44, 11, 3),
    (229, 45, 15, 2),
    (230, 45, 20, 1),
    (231, 46, 6, 2),
    (232, 46, 13, 1),
    (233, 47, 8, 3),
    (234, 47, 11, 2),
    (235, 48, 17, 1),
    (236, 48, 19, 1),
    (237, 49, 3, 2),
    (238, 49, 14, 1),
    (239, 50, 10, 3),
    (240, 50, 16, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 241
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (241, 51, 5, 2),
    (242, 51, 10, 1),
    (243, 52, 16, 3),
    (244, 52, 19, 2),
    (245, 53, 2, 1),
    (246, 53, 8, 5),
    (247, 54, 3, 1),
    (248, 54, 11, 3),
    (249, 55, 15, 2),
    (250, 55, 20, 1),
    (251, 56, 6, 2),
    (252, 56, 13, 1),
    (253, 57, 8, 3),
    (254, 57, 11, 2),
    (255, 58, 17, 1),
    (256, 58, 19, 1),
    (257, 59, 3, 2),
    (258, 59, 14, 1),
    (259, 60, 10, 3),
    (260, 60, 16, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 261
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (261, 61, 5, 2),
    (262, 61, 10, 1),
    (263, 62, 16, 3),
    (264, 62, 19, 2),
    (265, 63, 2, 1),
    (266, 63, 8, 5),
    (267, 64, 3, 1),
    (268, 64, 11, 3),
    (269, 65, 15, 2),
    (270, 65, 20, 1),
    (271, 66, 6, 2),
    (272, 66, 13, 1),
    (273, 67, 8, 3),
    (274, 67, 11, 2),
    (275, 68, 17, 1),
    (276, 68, 19, 1),
    (277, 69, 3, 2),
    (278, 69, 14, 1),
    (279, 70, 10, 3),
    (280, 70, 16, 2);

-- Inserimento di ulteriori 20 dettagli ordine casuali con IDDettaglio a partire da 281
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (281, 71, 5, 2),
    (282, 71, 10, 1),
    (283, 72, 16, 3),
    (284, 72, 19, 2),
    (285, 73, 2, 1),
    (286, 73, 8, 5),
    (287, 74, 3, 1),
    (288, 74, 11, 3),
    (289, 75, 15, 2),
    (290, 75, 20, 1),
    (291, 76, 6, 2),
    (292, 76, 13, 1),
    (293, 77, 8, 3),
    (294, 77, 11, 2),
    (295, 78, 17, 1),
    (296, 78, 19, 1),
    (297, 79, 3, 2),
    (298, 79, 14, 1),
    (299, 80, 10, 3),
    (300, 80, 16, 2);

-- Inserimento di ulteriori 30 dettagli ordine casuali con IDOrdine casuale da 1 a 120
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (301, FLOOR(RAND() * 120) + 1, 5, 2),
    (302, FLOOR(RAND() * 120) + 1, 10, 1),
    (303, FLOOR(RAND() * 120) + 1, 16, 3),
    (304, FLOOR(RAND() * 120) + 1, 19, 2),
    (305, FLOOR(RAND() * 120) + 1, 2, 1),
    (306, FLOOR(RAND() * 120) + 1, 8, 5),
    (307, FLOOR(RAND() * 120) + 1, 3, 1),
    (308, FLOOR(RAND() * 120) + 1, 11, 3),
    (309, FLOOR(RAND() * 120) + 1, 15, 2),
    (310, FLOOR(RAND() * 120) + 1, 20, 1),
    (311, FLOOR(RAND() * 120) + 1, 6, 2),
    (312, FLOOR(RAND() * 120) + 1, 13, 1),
    (313, FLOOR(RAND() * 120) + 1, 8, 3),
    (314, FLOOR(RAND() * 120) + 1, 11, 2),
    (315, FLOOR(RAND() * 120) + 1, 17, 1),
    (316, FLOOR(RAND() * 120) + 1, 19, 1),
    (317, FLOOR(RAND() * 120) + 1, 3, 2),
    (318, FLOOR(RAND() * 120) + 1, 14, 1),
    (319, FLOOR(RAND() * 120) + 1, 10, 3),
    (320, FLOOR(RAND() * 120) + 1, 16, 2),
    (321, FLOOR(RAND() * 120) + 1, 5, 2),
    (322, FLOOR(RAND() * 120) + 1, 10, 1),
    (323, FLOOR(RAND() * 120) + 1, 16, 3),
    (324, FLOOR(RAND() * 120) + 1, 19, 2),
    (325, FLOOR(RAND() * 120) + 1, 2, 1),
    (326, FLOOR(RAND() * 120) + 1, 8, 5),
    (327, FLOOR(RAND() * 120) + 1, 3, 1),
    (328, FLOOR(RAND() * 120) + 1, 11, 3),
    (329, FLOOR(RAND() * 120) + 1, 15, 2),
    (330, FLOOR(RAND() * 120) + 1, 20, 1);

-- Inserimento di ulteriori 30 dettagli ordine casuali con IDOrdine casuale da 1 a 120
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (331, FLOOR(RAND() * 120) + 1, 5, 2),
    (332, FLOOR(RAND() * 120) + 1, 10, 1),
    (333, FLOOR(RAND() * 120) + 1, 16, 3),
    (334, FLOOR(RAND() * 120) + 1, 19, 2),
    (335, FLOOR(RAND() * 120) + 1, 2, 1),
    (336, FLOOR(RAND() * 120) + 1, 8, 5),
    (337, FLOOR(RAND() * 120) + 1, 3, 1),
    (338, FLOOR(RAND() * 120) + 1, 11, 3),
    (339, FLOOR(RAND() * 120) + 1, 15, 2),
    (340, FLOOR(RAND() * 120) + 1, 20, 1),
    (341, FLOOR(RAND() * 120) + 1, 6, 2),
    (342, FLOOR(RAND() * 120) + 1, 13, 1),
    (343, FLOOR(RAND() * 120) + 1, 8, 3),
    (344, FLOOR(RAND() * 120) + 1, 11, 2),
    (345, FLOOR(RAND() * 120) + 1, 17, 1),
    (346, FLOOR(RAND() * 120) + 1, 19, 1),
    (347, FLOOR(RAND() * 120) + 1, 3, 2),
    (348, FLOOR(RAND() * 120) + 1, 14, 1),
    (349, FLOOR(RAND() * 120) + 1, 10, 3),
    (350, FLOOR(RAND() * 120) + 1, 16, 2),
    (351, FLOOR(RAND() * 120) + 1, 5, 2),
    (352, FLOOR(RAND() * 120) + 1, 10, 1),
    (353, FLOOR(RAND() * 120) + 1, 16, 3),
    (354, FLOOR(RAND() * 120) + 1, 19, 2),
    (355, FLOOR(RAND() * 120) + 1, 2, 1),
    (356, FLOOR(RAND() * 120) + 1, 8, 5),
    (357, FLOOR(RAND() * 120) + 1, 3, 1),
    (358, FLOOR(RAND() * 120) + 1, 11, 3),
    (359, FLOOR(RAND() * 120) + 1, 15, 2),
    (360, FLOOR(RAND() * 120) + 1, 20, 1);

-- Inserimento degli ultimi 30 dettagli ordine casuali con IDOrdine casuale da 1 a 120
INSERT INTO DettagliOrdine (IDDettaglio, IDOrdine, IDProdotto, Quantita)
VALUES
    (361, FLOOR(RAND() * 120) + 1, 5, 2),
    (362, FLOOR(RAND() * 120) + 1, 10, 1),
    (363, FLOOR(RAND() * 120) + 1, 16, 3),
    (364, FLOOR(RAND() * 120) + 1, 19, 2),
    (365, FLOOR(RAND() * 120) + 1, 2, 1),
    (366, FLOOR(RAND() * 120) + 1, 8, 5),
    (367, FLOOR(RAND() * 120) + 1, 3, 1),
    (368, FLOOR(RAND() * 120) + 1, 11, 3),
    (369, FLOOR(RAND() * 120) + 1, 15, 2),
    (370, FLOOR(RAND() * 120) + 1, 20, 1),
    (371, FLOOR(RAND() * 120) + 1, 6, 2),
    (372, FLOOR(RAND() * 120) + 1, 13, 1),
    (373, FLOOR(RAND() * 120) + 1, 8, 3),
    (374, FLOOR(RAND() * 120) + 1, 11, 2),
    (375, FLOOR(RAND() * 120) + 1, 17, 1),
    (376, FLOOR(RAND() * 120) + 1, 19, 1),
    (377, FLOOR(RAND() * 120) + 1, 3, 2),
    (378, FLOOR(RAND() * 120) + 1, 14, 1),
    (379, FLOOR(RAND() * 120) + 1, 10, 3),
    (380, FLOOR(RAND() * 120) + 1, 16, 2),
    (381, FLOOR(RAND() * 120) + 1, 5, 2),
    (382, FLOOR(RAND() * 120) + 1, 10, 1),
    (383, FLOOR(RAND() * 120) + 1, 16, 3),
    (384, FLOOR(RAND() * 120) + 1, 19, 2),
    (385, FLOOR(RAND() * 120) + 1, 2, 1),
    (386, FLOOR(RAND() * 120) + 1, 8, 5),
    (387, FLOOR(RAND() * 120) + 1, 3, 1),
    (388, FLOOR(RAND() * 120) + 1, 11, 3),
    (389, FLOOR(RAND() * 120) + 1, 15, 2),
    (390, FLOOR(RAND() * 120) + 1, 20, 1);
