Merge conflict resolution and updates
This commit is contained in:
107
Petstoredata.sql
107
Petstoredata.sql
@@ -146,6 +146,14 @@ CREATE TABLE saleItem (
|
||||
FOREIGN KEY (prodId) REFERENCES product(prodId)
|
||||
);
|
||||
|
||||
CREATE TABLE purchaseOrder (
|
||||
purchaseOrderId INT AUTO_INCREMENT PRIMARY KEY,
|
||||
supId INT NOT NULL,
|
||||
orderDate DATE NOT NULL,
|
||||
status VARCHAR(50) NOT NULL,
|
||||
FOREIGN KEY (supId) REFERENCES supplier(supId)
|
||||
);
|
||||
|
||||
CREATE TABLE activityLog (
|
||||
logId INT AUTO_INCREMENT PRIMARY KEY,
|
||||
employeeId INT NOT NULL,
|
||||
@@ -281,20 +289,97 @@ VALUES
|
||||
|
||||
INSERT INTO sale (saleDate, totalAmount, paymentMethod, employeeId, storeId)
|
||||
VALUES
|
||||
(NOW(), 60.00, 'Card', 2, 1),
|
||||
('2026-01-28 10:30:00', 50.00, 'Cash', 1, 1),
|
||||
('2026-01-29 14:15:00', 120.00, 'Card', 4, 3),
|
||||
('2026-01-30 16:45:00', 80.00, 'Card', 2, 2),
|
||||
('2026-02-01 11:20:00', 150.00, 'Cash', 5, 4);
|
||||
-- January Sales
|
||||
('2026-01-05 09:15:00', 125.00, 'Card', 1, 1), -- Sale 1: Dog food + treats
|
||||
('2026-01-08 11:30:00', 200.00, 'Card', 2, 1), -- Sale 2: Bird cage + fish tank
|
||||
('2026-01-12 14:20:00', 60.00, 'Cash', 3, 2), -- Sale 3: Cat toys + hamster wheel
|
||||
('2026-01-15 10:45:00', 150.00, 'Debit', 1, 1), -- Sale 4: Dog food (bulk purchase)
|
||||
('2026-01-18 16:30:00', 80.00, 'Card', 4, 3), -- Sale 5: Fish tank
|
||||
('2026-01-22 13:15:00', 95.00, 'Cash', 2, 2), -- Sale 6: Mixed items
|
||||
('2026-01-25 15:40:00', 240.00, 'Card', 5, 4), -- Sale 7: Two bird cages
|
||||
('2026-01-28 10:30:00', 80.00, 'Cash', 1, 1), -- Sale 8: Dog food + cat toys
|
||||
-- February Sales
|
||||
('2026-02-01 09:00:00', 175.00, 'Card', 3, 3), -- Sale 9: Dog food + treats (bulk)
|
||||
('2026-02-03 11:20:00', 120.00, 'Card', 2, 1), -- Sale 10: Bird cage
|
||||
('2026-02-05 14:50:00', 45.00, 'Cash', 4, 2), -- Sale 11: Hamster wheel + cat toys
|
||||
('2026-02-08 16:15:00', 160.00, 'Debit', 1, 1), -- Sale 12: Fish tank + accessories
|
||||
('2026-02-10 10:25:00', 100.00, 'Card', 5, 4), -- Sale 13: Dog treats (bulk)
|
||||
('2026-02-12 13:45:00', 50.00, 'Cash', 2, 2), -- Sale 14: Dog food
|
||||
('2026-02-15 15:30:00', 85.00, 'Card', 3, 3), -- Sale 15: Mixed pet supplies
|
||||
('2026-02-18 11:10:00', 200.00, 'Card', 1, 1), -- Sale 16: Bird cage + hamster wheel
|
||||
('2026-02-20 14:35:00', 155.00, 'Debit', 4, 3), -- Sale 17: Fish tank + cat toys
|
||||
('2026-02-22 16:50:00', 75.00, 'Cash', 2, 1), -- Sale 18: Dog treats + toys
|
||||
('2026-02-24 10:15:00', 140.00, 'Card', 5, 4), -- Sale 19: Dog food + treats
|
||||
(NOW(), 95.00, 'Card', 1, 1); -- Sale 20: Recent sale (current timestamp)
|
||||
|
||||
INSERT INTO saleItem (saleId, prodId, quantity, unitPrice)
|
||||
VALUES
|
||||
(1, 2, 2, 10.00),
|
||||
(2, 1, 1, 50.00),
|
||||
(3, 3, 1, 120.00),
|
||||
(4, 4, 1, 80.00),
|
||||
(5, 6, 6, 25.00),
|
||||
(2, 2, 3, 10.00);
|
||||
-- Sale 1 items (Dog food + treats)
|
||||
(1, 1, 2, 50.00), -- 2x Premium Dog Food
|
||||
(1, 6, 1, 25.00), -- 1x Organic Dog Treats
|
||||
-- Sale 2 items (Bird cage + fish tank)
|
||||
(2, 3, 1, 120.00), -- 1x Bird Cage Large
|
||||
(2, 4, 1, 80.00), -- 1x Fish Tank 20 Gallon
|
||||
-- Sale 3 items (Cat toys + hamster wheel)
|
||||
(3, 2, 3, 10.00), -- 3x Cat Toy Ball
|
||||
(3, 5, 2, 15.00), -- 2x Hamster Wheel
|
||||
-- Sale 4 items (Dog food bulk)
|
||||
(4, 1, 3, 50.00), -- 3x Premium Dog Food
|
||||
-- Sale 5 items (Fish tank)
|
||||
(5, 4, 1, 80.00), -- 1x Fish Tank 20 Gallon
|
||||
-- Sale 6 items (Mixed)
|
||||
(6, 2, 4, 10.00), -- 4x Cat Toy Ball
|
||||
(6, 5, 1, 15.00), -- 1x Hamster Wheel
|
||||
(6, 6, 1, 25.00), -- 1x Organic Dog Treats
|
||||
(6, 1, 1, 50.00), -- 1x Premium Dog Food (partial - discount applied)
|
||||
-- Sale 7 items (Two bird cages)
|
||||
(7, 3, 2, 120.00), -- 2x Bird Cage Large
|
||||
-- Sale 8 items (Dog food + cat toys)
|
||||
(8, 1, 1, 50.00), -- 1x Premium Dog Food
|
||||
(8, 2, 3, 10.00), -- 3x Cat Toy Ball
|
||||
-- Sale 9 items (Dog food + treats bulk)
|
||||
(9, 1, 3, 50.00), -- 3x Premium Dog Food
|
||||
(9, 6, 1, 25.00), -- 1x Organic Dog Treats
|
||||
-- Sale 10 items (Bird cage)
|
||||
(10, 3, 1, 120.00), -- 1x Bird Cage Large
|
||||
-- Sale 11 items (Hamster wheel + cat toys)
|
||||
(11, 5, 1, 15.00), -- 1x Hamster Wheel
|
||||
(11, 2, 3, 10.00), -- 3x Cat Toy Ball
|
||||
-- Sale 12 items (Fish tank + accessories)
|
||||
(12, 4, 2, 80.00), -- 2x Fish Tank 20 Gallon
|
||||
-- Sale 13 items (Dog treats bulk)
|
||||
(13, 6, 4, 25.00), -- 4x Organic Dog Treats
|
||||
-- Sale 14 items (Dog food)
|
||||
(14, 1, 1, 50.00), -- 1x Premium Dog Food
|
||||
-- Sale 15 items (Mixed supplies)
|
||||
(15, 2, 2, 10.00), -- 2x Cat Toy Ball
|
||||
(15, 5, 1, 15.00), -- 1x Hamster Wheel
|
||||
(15, 6, 2, 25.00), -- 2x Organic Dog Treats
|
||||
-- Sale 16 items (Bird cage + hamster wheel)
|
||||
(16, 3, 1, 120.00), -- 1x Bird Cage Large
|
||||
(16, 4, 1, 80.00), -- 1x Fish Tank 20 Gallon
|
||||
-- Sale 17 items (Fish tank + cat toys)
|
||||
(17, 4, 1, 80.00), -- 1x Fish Tank 20 Gallon
|
||||
(17, 1, 1, 50.00), -- 1x Premium Dog Food
|
||||
(17, 6, 1, 25.00), -- 1x Organic Dog Treats
|
||||
-- Sale 18 items (Dog treats + toys)
|
||||
(18, 6, 2, 25.00), -- 2x Organic Dog Treats
|
||||
(18, 2, 2, 10.00), -- 2x Cat Toy Ball
|
||||
(18, 5, 1, 15.00), -- 1x Hamster Wheel
|
||||
-- Sale 19 items (Dog food + treats)
|
||||
(19, 1, 2, 50.00), -- 2x Premium Dog Food
|
||||
(19, 6, 2, 25.00), -- 2x Organic Dog Treats (discount applied)
|
||||
-- Sale 20 items (Recent sale)
|
||||
(20, 2, 5, 10.00), -- 5x Cat Toy Ball
|
||||
(20, 5, 3, 15.00); -- 3x Hamster Wheel
|
||||
|
||||
INSERT INTO purchaseOrder (supId, orderDate, status)
|
||||
VALUES
|
||||
(1, '2025-01-15', 'Delivered'),
|
||||
(2, '2025-01-20', 'Pending'),
|
||||
(3, '2025-02-01', 'Delivered'),
|
||||
(4, '2025-02-10', 'In Transit'),
|
||||
(1, '2025-02-15', 'Pending');
|
||||
|
||||
INSERT INTO activityLog (employeeId, activity)
|
||||
VALUES
|
||||
|
||||
Reference in New Issue
Block a user