-
Notifications
You must be signed in to change notification settings - Fork 1
/
SQL Statements.sql
102 lines (78 loc) · 7.47 KB
/
SQL Statements.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
--INSERT INTO VALUES ('', '', '', '', );
INSERT INTO Customer VALUES ('CUST000100', 'Alan', 'Smith', 'Dawson St', 'Newcastle', '2300', 'verified');
INSERT INTO Customer VALUES ('CUST000200', 'Amber', 'Clarke', 'Chilcott St', 'Newcastle', '2299', Default);
INSERT INTO Customer VALUES ('CUST000300', 'Michael', 'Stuart', 'Baker St', 'Maitland', '2300', 'verified');
INSERT INTO CPhone VALUES ('0421345678', 'CUST000100');
INSERT INTO CPhone VALUES ('0421345679', 'CUST000100');
INSERT INTO CPhone VALUES ('0431456789', 'CUST000300');
INSERT INTO BankDetails VALUES ('063456', 'Australian Bank');
INSERT INTO BankDetails VALUES ('075492', 'Newcastle Bank');
INSERT INTO BankDetails VALUES ('082098', 'People Bank');
INSERT INTO DriverStaff VALUES ('STAFF00100', 'Mir', 'Danish', 'Apple St', 'Newcastle', '2301', 'TFN123456', '063456', '1234512345', Default , 18.5, 'LIC1234567', 'Senior Staff');
INSERT INTO DriverStaff VALUES ('STAFF00200', 'Cindy', 'Crown', 'Crom St', 'Maitland', '2323', 'TFN234567', '063456', '2345623456', Default, 18.5, 'LIC2345678', 'Senior Staff');
INSERT INTO DriverStaff VALUES ('STAFF00300', 'Liam', 'Stanley', 'Broadway St', 'Maitland', '2324', 'TFN345678', '075492', '3456734567', Default, 18.5, 'LIC3456789', 'Junior Staff');
INSERT INTO InStoreStaff VALUES ('STAFF00400', 'Michelle', 'Humberson', 'Journey St', 'Maitland', '2324', 'TFN456789', '075492', '4567845678', Default, 22.5, 'Junior Staff');
INSERT INTO InStoreStaff VALUES ('STAFF00500', 'Dalila', 'Hamper', 'Holland St', 'Newcastle', '2301', 'TFN567891', '082098', '5678956789', Default, 22.5, 'Junior Staff');
INSERT INTO InStoreStaff VALUES ('STAFF00600', 'Mia', 'Delisha', 'Princess St', 'Newcastle', '2300', 'TFN678912', '082098', '6789167891', Default, 22.5, 'Senior Staff');
INSERT INTO OrderPayment VALUES ('PAY00100', 'Credit Card', '10.50');
INSERT INTO OrderPayment VALUES ('PAY00200', 'Credit Card', '20.50');
INSERT INTO OrderPayment VALUES ('PAY00300', 'Credit Card', '30.50');
INSERT INTO OrderPayment VALUES ('PAY00400', 'Credit Card', '40.50');
INSERT INTO OrderPayment VALUES ('PAY00500', 'Credit Card', '50.50');
INSERT INTO OrderPayment VALUES ('PAY00600', 'Credit Card', '60.50');
INSERT INTO OrderPayment VALUES ('PAY00700', 'Credit Card', '70.50');
INSERT INTO Orders VALUES ('ORDER00100', 'STAFF00400', 'CUST000100', '2021-02-23 09:10:30', 'Phone', 'Delivery', 'PAY00100', 'In Process');
INSERT INTO Orders VALUES ('ORDER00200', 'STAFF00400', 'CUST000200', '2021-02-12 10:12:15', 'Phone', 'Pickup', 'PAY00200', 'Delivered');
INSERT INTO Orders VALUES ('ORDER00300', 'STAFF00400', 'CUST000300', '2021-02-12 10:12:15', 'Walk-in', 'Pickup', 'PAY00300', 'Ordered');
INSERT INTO Orders VALUES ('ORDER00400', 'STAFF00500', 'CUST000100', '2021-02-12 10:12:15', 'Walk-in', 'Pickup', 'PAY00400', 'Ordered');
INSERT INTO Orders VALUES ('ORDER00500', 'STAFF00500', 'CUST000200', '2021-02-12 10:12:15', 'Walk-in', 'Pickup', 'PAY00500', 'Ordered');
INSERT INTO Orders VALUES ('ORDER00600', 'STAFF00600', 'CUST000300', '2021-02-12 10:12:15', 'Phone', 'Delivery', 'PAY00600', 'Ordered');
INSERT INTO Orders VALUES ('ORDER00700', 'STAFF00600', 'CUST000100', '2021-02-12 10:12:15', 'Phone', 'Delivery', 'PAY00700', 'Ordered');
INSERT INTO WalkInOrder VALUES ('ORDER00300', '2021-02-05 12:02:05');
INSERT INTO WalkInOrder VALUES ('ORDER00400', '2021-01-06 12:46:23');
INSERT INTO WalkInOrder VALUES ('ORDER00500', '2021-01-23 12:35:24');
INSERT INTO PhoneOrder VALUES ('ORDER00100', '2021-02-23 09:00:01', '2021-02-23 09:05:24');
INSERT INTO PhoneOrder VALUES ('ORDER00200', '2021-02-12 09:45:20', '2021-02-12 09:50:02');
INSERT INTO PhoneOrder VALUES ('ORDER00600', '2021-01-30 10:56:23', '2021-01-30 11:01:20');
INSERT INTO PhoneOrder VALUES ('ORDER00700', '2021-01-25 11:26:43', '2021-01-25 11:31:20');
INSERT INTO DriverPay VALUES ('SALARY0010', 2300.50, 100, 2200.50, '2021-02-01', '2021-02-28');
INSERT INTO DriverPay VALUES ('SALARY0020', 3400.50, 100, 3300.50, '2021-02-01', '2021-02-28');
INSERT INTO DriverPay VALUES ('SALARY0030', 1800.50, 100, 1700.50, '2021-02-01', '2021-02-28');
INSERT INTO DriverPay VALUES ('SALARY0070', 1800.50, 100, 1700.50, '2021-04-01', '2021-04-28');
INSERT INTO InStorePay VALUES ('SALARY0040', 4000 , 100, 3900, '2021-02-01', '2021-02-28');
INSERT INTO InStorePay VALUES ('SALARY0050', 5000, 100, 4900, '2021-02-01', '2021-02-28');
INSERT INTO InStorePay VALUES ('SALARY0060', 2200, 100, 2100, '2021-02-01', '2021-02-28');
INSERT INTO InStorePay VALUES ('SALARY0080', 2200, 100, 2100, '2021-04-01', '2021-04-28');
INSERT INTO DriverShift VALUES ('S0100', 'STAFF00100', 'SALARY0010', '2021-02-03 08:00:05', '2021-02-03 16:05:08', Default);
INSERT INTO DriverShift VALUES ('S0200', 'STAFF00200', 'SALARY0020', '2021-02-03 08:01:25', '2021-02-03 16:15:37', Default);
INSERT INTO DriverShift VALUES ('S0300', 'STAFF00300', 'SALARY0030', '2021-02-03 08:05:23', '2021-02-03 16:10:22', Default);
INSERT INTO DriverShift VALUES ('S0700', 'STAFF00100', 'SALARY0010', '2021-02-20 08:07:23', '2021-02-03 16:02:02', Default);
INSERT INTO DriverShift VALUES ('S0800', 'STAFF00300', 'SALARY0070', '2021-03-20 08:07:23', '2021-03-03 16:02:02', Default);
INSERT INTO InStoreShift VALUES ('S0400', 'STAFF00400', 'SALARY0040', '2021-02-03 08:00:20', '2021-02-03 16:30:08', Default);
INSERT INTO InStoreShift VALUES ('S0500', 'STAFF00500', 'SALARY0050', '2021-02-03 08:03:23', '2021-02-03 16:45:37', Default);
INSERT INTO InStoreShift VALUES ('S0600', 'STAFF00600', 'SALARY0060', '2021-02-03 08:06:47', '2021-02-03 16:46:22', Default);
INSERT INTO Delivery VALUES ('ORDER00100', '2021-02-23 09:30:30');
INSERT INTO Delivery VALUES ('ORDER00600', '2021-02-23 09:35:35');
INSERT INTO Delivery VALUES ('ORDER00700', '2021-02-23 09:20:10');
INSERT INTO Pickup VALUES ('ORDER00200', '2021-02-12 10:15:27');
INSERT INTO Pickup VALUES ('ORDER00100', '2021-02-05 12:29:01');
INSERT INTO Pickup VALUES ('ORDER00600', '2021-01-23 09:30:50');
INSERT INTO Pickup VALUES ('ORDER00700', '2021-01-29 09:40:20');
INSERT INTO MenuItem VALUES ('ME001', 'Pizza', '10', 'Large Pizza', '23.50');
INSERT INTO MenuItem VALUES ('ME002', 'Spaghetti', '12', 'Medium Spaghetti', '15.90');
INSERT INTO MenuItem VALUES ('ME003', 'Chicken Wing', '6', '6 pieces CW', '18.90');
INSERT INTO QMenuOrder VALUES ('ORDER00100', 'ME001', '2');
INSERT INTO QMenuOrder VALUES ('ORDER00200', 'ME002', '1');
INSERT INTO QMenuOrder VALUES ('ORDER00300', 'ME003', '1');
INSERT INTO Ingredient VALUES ('ING0000100', 'Cheese', 10, 'Dairy', '10 gram', 20, '2021-02-28 16:00:12', 15, 10);
INSERT INTO Ingredient VALUES ('ING0000200', 'Tomato', 10, 'Fruit', '10 gram', 20, '2021-02-28 16:02:14', 15, 10);
INSERT INTO Ingredient VALUES ('ING0000300', 'Bread', 10, 'Pizza Base', '10 gram', 20, '2021-02-28 16:01:23', 15, 10);
INSERT INTO QMenuIngredient VALUES ('ME001', 'ING0000100', 10);
INSERT INTO QMenuIngredient VALUES ('ME001', 'ING0000200', 10);
INSERT INTO QMenuIngredient VALUES ('ME001', 'ING0000300', 1);
INSERT INTO IngredientOrder VALUES ('SUPP000100', '2021-02-25', '2021-03-01', 29.90, 'Delivered');
INSERT INTO IngredientOrder VALUES ('SUPP000200', '2021-02-25', '2021-03-01', 39.90, 'Delivered');
INSERT INTO IngredientOrder VALUES ('SUPP000300', '2021-02-25', '2021-03-01', 49.90, 'Delivered');
INSERT INTO QIngredientHas2Order VALUES ('ING0000100', 'SUPP000100', 29.90, 1);
INSERT INTO QIngredientHas2Order VALUES ('ING0000200', 'SUPP000100', 39.90, 1);
INSERT INTO QIngredientHas2Order VALUES ('ING0000300', 'SUPP000100', 49.90, 1);