-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_tables.sql
316 lines (290 loc) · 26.3 KB
/
create_tables.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
create table CUSTOMER (
CUSTOMER_KEY number,
FIO varchar2(100),
AGE number,
CONSTRAINT CUSTOMER_PK PRIMARY KEY (CUSTOMER_KEY)
);
/
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (1,'Nolan Walters',59);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (2,'Hop Klein',31);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (3,'Grant Kim',69);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (4,'Ulric Foley',19);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (5,'Cameron Cross',89);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (6,'Guy Larson',26);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (7,'Evan Sweet',66);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (8,'Geoffrey Puckett',80);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (9,'Xenos Moss',77);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (10,'Aladdin Floyd',66);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (11,'Uriel Hill',44);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (12,'Addison Hays',63);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (13,'Hammett Edwards',56);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (14,'Isaac Cruz',43);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (15,'Graham Roy',34);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (16,'Garrison Aguirre',84);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (17,'Tate Olson',18);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (18,'Dieter Wolfe',27);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (19,'Hunter Drake',22);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (20,'Beau Floyd',41);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (21,'Reece Ramirez',77);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (22,'Quentin Casey',49);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (23,'Damon Bridges',68);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (24,'Otto Mcknight',52);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (25,'Lev Ferguson',35);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (26,'Lewis Miranda',80);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (27,'Sylvester Roberts',71);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (28,'Wang Wells',26);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (29,'Logan Dillon',59);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (30,'Richard Silva',40);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (31,'Ferris Miranda',32);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (32,'Vaughan Cameron',44);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (33,'Cyrus Jones',87);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (34,'Macon Carrillo',37);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (35,'Tarik Mayo',37);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (36,'Aaron Branch',73);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (37,'Wylie Sparks',18);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (38,'Arden Barnett',19);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (39,'Barrett Carson',83);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (40,'Tanek Mueller',34);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (41,'Cruz Sullivan',38);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (42,'Hakeem Bond',73);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (43,'Dillon Mendoza',77);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (44,'Jason Velez',47);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (45,'Armand Roach',22);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (46,'Kamal Ortega',30);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (47,'Bert Hahn',47);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (48,'Sean Dillard',60);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (49,'Salvador Baxter',25);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (50,'Elvis Cotton',46);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (51,'Uriah Ramos',82);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (52,'Xenos Burke',79);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (53,'Gary Aguilar',82);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (54,'Philip Ford',28);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (55,'Dexter Hopper',47);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (56,'Felix Moon',80);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (57,'George Osborn',23);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (58,'Abraham Ball',25);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (59,'Bernard Farmer',46);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (60,'Paki Duran',73);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (61,'Acton Lancaster',71);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (62,'Lars Blankenship',76);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (63,'Herrod Weber',75);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (64,'Thane Lindsay',23);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (65,'Erich Woodard',20);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (66,'Paul Guthrie',30);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (67,'Brady Kelly',47);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (68,'Jeremy Shelton',17);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (69,'Hamilton Conway',86);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (70,'Noah Hansen',19);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (71,'Hilel Baird',75);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (72,'Nasim Albert',78);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (73,'Tiger Cole',68);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (74,'Gabriel Sykes',27);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (75,'Bruno Alexander',34);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (76,'Brett Davenport',60);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (77,'Tucker Torres',22);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (78,'Myles Mcfadden',75);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (79,'Acton Levy',55);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (80,'Owen Glover',72);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (81,'Dalton Fuller',29);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (82,'Stuart Moss',90);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (83,'Yasir Cruz',16);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (84,'Harding Raymond',88);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (85,'Joshua Washington',24);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (86,'Colton Salazar',18);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (87,'Colt Riddle',23);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (88,'Brody Mcconnell',55);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (89,'Alec Gillespie',90);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (90,'Chaim Kaufman',19);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (91,'Scott Mcdowell',64);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (92,'Philip Stark',62);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (93,'Lucas Thompson',74);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (94,'Gareth Rios',58);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (95,'Arden Cross',75);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (96,'Jameson Francis',63);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (97,'Emerson Caldwell',61);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (98,'Amery Finley',44);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (99,'Stephen Munoz',42);
INSERT INTO customer (CUSTOMER_KEY,FIO,AGE) VALUES (100,'Philip Dunn',29);
create table PRODUCT_CATEGORY (
CATEGORY_KEY number,
CATEGORY varchar2(100),
CONSTRAINT CATEGORY_PK PRIMARY KEY (CATEGORY_KEY)
);
/
insert into product_category VALUES(1, 'TOYS');
insert into product_category VALUES(2, 'KONSTRUKTOR');
insert into product_category VALUES(3, 'CARS');
insert into product_category VALUES(4, 'GAMES');
insert into product_category VALUES(5, 'OTHER');
create table PRODUCT (
PRODUCT_KEY number,
CATEGORY_KEY number,
NAME varchar2(100),
PRICE number,
CONSTRAINT PRODUCT_PK PRIMARY KEY (PRODUCT_KEY),
CONSTRAINT FK_CATEGORY
FOREIGN KEY (CATEGORY_KEY)
REFERENCES PRODUCT_CATEGORY (CATEGORY_KEY)
);
/
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (1,1,'TEDDY',1172);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (2,5,'Tristique Aliquet Limited',655);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (3,3,'Non Lobortis Institute',1373);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (4,3,'Sociis Natoque Company',397);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (5,4,'Urna Nullam Lobortis Company',2176);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (6,2,'LEGO',562);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (7,2,'Elit Aliquam Company',727);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (8,5,'Mattis Integer Eu Consulting',824);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (9,4,'A Odio Inc.',512);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (10,3,'Tempus Lorem Inc.',1269);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (11,4,'Donec Fringilla Donec LLP',2462);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (12,1,'Et Foundation',1282);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (13,1,'At LLP',639);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (14,1,'Consectetuer Euismod Inc.',1093);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (15,5,'Feugiat Consulting',1955);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (16,3,'Arcu Vel Quam Incorporated',956);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (17,5,'Magna Nam Ligula Company',1999);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (18,5,'Orci Ut Industries',493);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (19,1,'Malesuada Fames Ac Corporation',1312);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (20,5,'Orci Phasellus Dapibus Company',976);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (21,1,'Ligula Aliquam Erat Industries',2160);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (22,2,'Magnis Dis Parturient Foundation',938);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (23,3,'Senectus Industries',1794);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (24,2,'Velit Inc.',387);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (25,5,'Erat Neque Non LLP',1820);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (26,4,'Consectetuer Adipiscing Associates',2148);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (27,4,'Enim Condimentum PC',51);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (28,3,'Odio Auctor Corp.',730);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (29,1,'Diam Ltd',1371);
INSERT INTO product (PRODUCT_KEY,CATEGORY_KEY,NAME,PRICE) VALUES (30,2,'Duis Volutpat Nunc Consulting',354);
create table PURCHASE (
PURCHASE_KEY number,
CUSTOMER_KEY number,
PRODUCT_KEY number,
QTY number,
"DATE" date,
CONSTRAINT FK_CUSTOMER
FOREIGN KEY (CUSTOMER_KEY)
REFERENCES CUSTOMER (CUSTOMER_KEY),
CONSTRAINT FK_PRODUCT
FOREIGN KEY (PRODUCT_KEY)
REFERENCES PRODUCT (PRODUCT_KEY)
);
/
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (8,32,11,5,to_date('27.01.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (8,32,8,2,to_date('27.01.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (19,57,15,1,to_date('17.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (19,57,30,8,to_date('17.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (19,57,24,2,to_date('17.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (27,58,6,2,to_date('16.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (27,58,22,6,to_date('16.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (27,58,18,9,to_date('16.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (27,58,17,1,to_date('16.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (6,16,9,9,to_date('22.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (6,16,23,5,to_date('22.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (6,16,3,6,to_date('22.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (6,16,28,1,to_date('22.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (45,33,16,1,to_date('29.12.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (45,33,21,9,to_date('29.12.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (45,33,30,9,to_date('29.12.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (11,68,24,9,to_date('13.09.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (11,68,17,7,to_date('13.09.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (30,33,14,4,to_date('27.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (10,50,2,1,to_date('23.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (10,50,1,5,to_date('23.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (10,50,18,4,to_date('23.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (10,50,5,1,to_date('23.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (42,10,17,4,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (42,10,26,1,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (42,10,23,8,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (42,10,29,1,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (42,10,7,7,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (3,51,27,5,to_date('20.07.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (4,99,23,10,to_date('22.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (4,99,9,5,to_date('22.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (4,99,4,10,to_date('22.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (4,99,30,10,to_date('22.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (4,99,13,7,to_date('22.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (4,99,3,4,to_date('22.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (31,19,30,7,to_date('30.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (31,19,4,10,to_date('30.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (39,13,9,5,to_date('07.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (39,13,30,7,to_date('07.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (39,13,20,8,to_date('07.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (9,50,27,4,to_date('30.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (9,50,21,7,to_date('30.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (38,71,7,8,to_date('28.11.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (38,71,4,10,to_date('28.11.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (17,55,16,9,to_date('03.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (13,22,1,6,to_date('30.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (13,22,13,5,to_date('30.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (13,22,21,7,to_date('30.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (13,22,9,4,to_date('30.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (22,94,20,6,to_date('23.11.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (26,57,20,5,to_date('14.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (26,57,18,8,to_date('14.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (16,45,17,7,to_date('09.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (16,45,17,1,to_date('09.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (16,45,7,4,to_date('09.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (16,45,10,8,to_date('09.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (5,87,29,1,to_date('22.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (5,87,24,5,to_date('22.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (5,87,21,8,to_date('22.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (7,77,17,8,to_date('05.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (20,50,11,4,to_date('01.09.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (18,76,30,8,to_date('17.11.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (18,76,4,3,to_date('17.11.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (2,73,19,5,to_date('04.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (2,73,9,1,to_date('04.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (2,73,7,10,to_date('04.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (36,94,14,10,to_date('12.01.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (48,42,23,8,to_date('06.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (33,77,25,9,to_date('28.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (33,77,13,7,to_date('28.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (33,77,1,1,to_date('28.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (33,77,12,7,to_date('28.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (1,66,20,6,to_date('14.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (1,66,25,6,to_date('14.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (1,66,12,1,to_date('14.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (49,9,30,7,to_date('04.12.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (24,52,15,8,to_date('08.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (24,52,28,6,to_date('08.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (24,52,10,4,to_date('08.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (35,17,24,3,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (35,17,26,10,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (35,17,10,2,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (35,17,22,7,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (35,17,15,4,to_date('31.10.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (47,17,26,5,to_date('26.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (47,17,30,6,to_date('26.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (47,17,2,8,to_date('26.08.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (37,99,22,2,to_date('20.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (25,87,27,9,to_date('11.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (25,87,28,4,to_date('11.03.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (15,11,29,4,to_date('21.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (15,11,21,10,to_date('21.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (15,11,29,9,to_date('21.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (15,11,26,7,to_date('21.02.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (50,87,27,9,to_date('16.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (32,98,1,1,to_date('21.07.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (32,98,20,2,to_date('21.07.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (44,13,4,3,to_date('01.11.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (21,53,6,2,to_date('30.09.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (41,44,29,2,to_date('24.01.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (12,88,29,2,to_date('02.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (12,88,30,2,to_date('02.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (12,88,2,2,to_date('02.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (12,88,7,2,to_date('02.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (12,88,5,2,to_date('02.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (14,44,1,2,to_date('03.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (14,44,2,2,to_date('03.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (14,44,3,2,to_date('03.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (14,44,4,2,to_date('03.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (14,44,5,2,to_date('03.05.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (23,54,1,10,to_date('11.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (23,54,6,5,to_date('11.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (23,54,4,10,to_date('11.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (23,54,30,10,to_date('11.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (57,19,1,7,to_date('30.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (57,19,6,10,to_date('30.04.2018','DD.MM.YYYY'));
INSERT INTO PURCHASE (PURCHASE_KEY,CUSTOMER_KEY,PRODUCT_KEY,QTY,"DATE") VALUES (58,79,1,2,to_date('16.04.2018','DD.MM.YYYY'));