-
Notifications
You must be signed in to change notification settings - Fork 0
/
cw3.sql
1390 lines (1372 loc) · 39.8 KB
/
cw3.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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# All our SQL was designed and run successfully on MySQL 5.6, hosted on AWS
# Table DDL:
CREATE TABLE Address
(
AddressID int Primary Key AUTO_INCREMENT,
address_line_1 varchar(255),
address_line_2 varchar(255),
post_code varchar(10)
);
CREATE TABLE Property
(
PropertyID int Primary Key AUTO_INCREMENT,
sale_price int,
address_id int,
FOREIGN KEY (address_id) REFERENCES Address (AddressID),
size_unit varchar(16)
);
CREATE TABLE House
(
HouseID int Primary Key AUTO_INCREMENT,
FOREIGN KEY (HouseID) REFERENCES Property (PropertyID)
);
CREATE TABLE Flat
(
FlatID int Primary Key AUTO_INCREMENT,
FOREIGN KEY (FlatID) REFERENCES Property (PropertyID),
leasehold_payment int,
leasehold_frequency varchar(32)
);
CREATE TABLE Room
(
RoomID int Primary Key AUTO_INCREMENT,
size int,
property_id int,
FOREIGN KEY (property_id) REFERENCES Property (PropertyID),
type varchar(32)
);
CREATE TABLE User
(
UserID int Primary Key AUTO_INCREMENT,
address_id int,
FOREIGN KEY (address_id) REFERENCES Address (AddressID),
age int,
f_name varchar(32),
l_name varchar(32)
);
CREATE TABLE Click
(
ClickID int Primary Key AUTO_INCREMENT,
dtime datetime,
property_id int,
FOREIGN KEY (property_id) REFERENCES Property (PropertyID),
UserID int,
FOREIGN KEY (UserID) REFERENCES User (UserID)
);
# Sample Data:
INSERT INTO Address
VALUES (NULL, 'Studio 16p Donna loop', 'Port Anthonyside', 'G63 9ZH');
INSERT INTO Address
VALUES (NULL, 'Flat 82 Parkin lodge', 'Thomasfort', 'TF18 6GL');
INSERT INTO Address
VALUES (NULL, 'Flat 8 Stevenson spurs', 'East Annebury', 'E28 9ZN');
INSERT INTO Address
VALUES (NULL, 'Studio 30 Cook course', 'Susanport', 'L6 1SF');
INSERT INTO Address
VALUES (NULL, '0 Davies plains ', 'Davidville', 'YO34 9RL');
INSERT INTO Address
VALUES (NULL, 'Flat 00 Young common', 'North Jacktown', 'CR6B 9PL');
INSERT INTO Address
VALUES (NULL, 'Studio 5 Barbara ports', 'North Beverleystad', 'M9 9BY');
INSERT INTO Address
VALUES (NULL, 'Flat 22 Beverley fork', 'Bellborough', 'DN00 8JX');
INSERT INTO Address
VALUES (NULL, '697 Chloe causeway ', 'Juneside', 'W76 9UG');
INSERT INTO Address
VALUES (NULL, '9 Morgan isle ', 'New Darren', 'EN3 3XE');
INSERT INTO Address
VALUES (NULL, 'Studio 1 Sian villages', 'Kingtown', 'CB2B 2BQ');
INSERT INTO Address
VALUES (NULL, 'Studio 66l Liam corners', 'Port Sarah', 'G8E 4BE');
INSERT INTO Address
VALUES (NULL, 'Studio 27C Callum ridges', 'West Pauline', 'M46 6WW');
INSERT INTO Address
VALUES (NULL, 'Flat 6 Lindsey court', 'East Anthonybury', 'B8 9JD');
INSERT INTO Address
VALUES (NULL, '780 Hardy plains ', 'Russellfurt', 'TS9Y 7UQ');
INSERT INTO Address
VALUES (NULL, '2 Francis ports ', 'South Irene', 'W1 4HZ');
INSERT INTO Address
VALUES (NULL, '985 Kayleigh center ', 'South Tina', 'CO0N 8FE');
INSERT INTO Address
VALUES (NULL, 'Flat 20 Carter bypass', 'Lake Katy', 'NG4 7PD');
INSERT INTO Address
VALUES (NULL, 'Flat 69b Henry springs', 'New Gerard', 'M0 4GT');
INSERT INTO Address
VALUES (NULL, 'Flat 5 Hunt summit', 'Iqbalview', 'M67 0RX');
INSERT INTO Address
VALUES (NULL, '790 Evans forge ', 'Jessicaview', 'E4F 4ZU');
INSERT INTO Address
VALUES (NULL, '1 Richard ridges ', 'West Denisemouth', 'W7B 8RN');
INSERT INTO Address
VALUES (NULL, 'Flat 10 Jones harbors', 'Phillipsstad', 'UB9Y 5XR');
INSERT INTO Address
VALUES (NULL, 'Studio 80 Cooper gardens', 'Bethanborough', 'HA7R 7EQ');
INSERT INTO Address
VALUES (NULL, '179 Begum island ', 'South Katechester', 'HR5 3EW');
INSERT INTO Address
VALUES (NULL, '25 Charlene dale ', 'Lydiamouth', 'MK41 6WD');
INSERT INTO Address
VALUES (NULL, '8 Howard meadows ', 'West Antony', 'IP32 3EX');
INSERT INTO Address
VALUES (NULL, 'Studio 55 Elaine wall', 'Warrenmouth', 'B7 7YR');
INSERT INTO Address
VALUES (NULL, 'Studio 37m Dean rue', 'Burtonshire', 'L3 9WW');
INSERT INTO Address
VALUES (NULL, '0 Emily radial ', 'East Nataliemouth', 'E48 6NX');
INSERT INTO Address
VALUES (NULL, 'Studio 10 Higgins flats', 'Nortonbury', 'SG57 6LX');
INSERT INTO Address
VALUES (NULL, 'Studio 1 Lewis creek', 'Graychester', 'PL33 2QB');
INSERT INTO Address
VALUES (NULL, '703 Potter summit ', 'South Aaronport', 'BA58 5ZZ');
INSERT INTO Address
VALUES (NULL, '4 Holly corner ', 'Wongshire', 'HP8P 1YP');
INSERT INTO Address
VALUES (NULL, '854 Clayton hill ', 'West Jacob', 'M6K 1DT');
INSERT INTO Address
VALUES (NULL, '93 Lewis inlet ', 'Gillianfurt', 'TR8 4DE');
INSERT INTO Address
VALUES (NULL, '652 Billy greens ', 'New Donnaborough', 'ME4 2JB');
INSERT INTO Address
VALUES (NULL, 'Studio 74t Collins plains', 'Gavinstad', 'DT4 6NA');
INSERT INTO Address
VALUES (NULL, '3 Brett circles ', 'Morrisburgh', 'B4U 3FS');
INSERT INTO Address
VALUES (NULL, 'Studio 41d Walsh park', 'Julianmouth', 'ZE7 3RL');
INSERT INTO Address
VALUES (NULL, 'Studio 47 Elizabeth wall', 'Lake Ruthfurt', 'N4H 8SE');
INSERT INTO Address
VALUES (NULL, '618 Shannon heights ', 'Lake Rhyshaven', 'L6A 7ZB');
INSERT INTO Address
VALUES (NULL, '6 Glenn harbors ', 'Webbfurt', 'S4 6FS');
INSERT INTO Address
VALUES (NULL, 'Studio 8 Sophie hollow', 'Lawrencebury', 'SM6M 4AX');
INSERT INTO Address
VALUES (NULL, 'Flat 78a Walker walk', 'East Rosie', 'M4 4LX');
INSERT INTO Property
VALUES (NULL, 877675, 1, 'Metres');
INSERT INTO Property
VALUES (NULL, 833156, 2, 'Metres');
INSERT INTO Property
VALUES (NULL, 889983, 3, 'Metres');
INSERT INTO Property
VALUES (NULL, 987477, 4, 'Metres');
INSERT INTO Property
VALUES (NULL, 357164, 5, 'Metres');
INSERT INTO Property
VALUES (NULL, 494577, 6, 'Metres');
INSERT INTO Property
VALUES (NULL, 41123, 7, 'Metres');
INSERT INTO Property
VALUES (NULL, 335006, 8, 'Metres');
INSERT INTO Property
VALUES (NULL, 939843, 9, 'Feet');
INSERT INTO Property
VALUES (NULL, 433101, 10, 'Metres');
INSERT INTO Property
VALUES (NULL, 539880, 11, 'Metres');
INSERT INTO Property
VALUES (NULL, 39362, 12, 'Feet');
INSERT INTO Property
VALUES (NULL, 936366, 13, 'Feet');
INSERT INTO Property
VALUES (NULL, 424668, 14, 'Metres');
INSERT INTO Property
VALUES (NULL, 235042, 15, 'Feet');
INSERT INTO Property
VALUES (NULL, 1932, 16, 'Feet');
INSERT INTO Property
VALUES (NULL, 858306, 17, 'Metres');
INSERT INTO Property
VALUES (NULL, 383368, 18, 'Feet');
INSERT INTO Property
VALUES (NULL, 527155, 19, 'Feet');
INSERT INTO Property
VALUES (NULL, 547608, 20, 'Feet');
INSERT INTO Property
VALUES (NULL, 952896, 21, 'Feet');
INSERT INTO Property
VALUES (NULL, 7233, 22, 'Feet');
INSERT INTO Property
VALUES (NULL, 111252, 23, 'Metres');
INSERT INTO Property
VALUES (NULL, 488996, 24, 'Feet');
INSERT INTO Property
VALUES (NULL, 872549, 25, 'Feet');
INSERT INTO Property
VALUES (NULL, 642108, 26, 'Metres');
INSERT INTO Property
VALUES (NULL, 876884, 27, 'Feet');
INSERT INTO Property
VALUES (NULL, 951232, 28, 'Metres');
INSERT INTO Property
VALUES (NULL, 86194, 29, 'Metres');
INSERT INTO Property
VALUES (NULL, 466256, 30, 'Metres');
INSERT INTO House
VALUES (1);
INSERT INTO House
VALUES (2);
INSERT INTO House
VALUES (3);
INSERT INTO House
VALUES (4);
INSERT INTO House
VALUES (5);
INSERT INTO House
VALUES (6);
INSERT INTO House
VALUES (7);
INSERT INTO House
VALUES (8);
INSERT INTO House
VALUES (9);
INSERT INTO House
VALUES (10);
INSERT INTO House
VALUES (11);
INSERT INTO House
VALUES (12);
INSERT INTO House
VALUES (13);
INSERT INTO House
VALUES (14);
INSERT INTO House
VALUES (15);
INSERT INTO Flat
VALUES (16, 2471, 'Monthly');
INSERT INTO Flat
VALUES (17, 6483, 'Monthly');
INSERT INTO Flat
VALUES (18, 4093, 'Yearly');
INSERT INTO Flat
VALUES (19, 7254, 'Yearly');
INSERT INTO Flat
VALUES (20, 4727, 'Quarterly');
INSERT INTO Flat
VALUES (21, 4443, 'Monthly');
INSERT INTO Flat
VALUES (22, 6266, 'Monthly');
INSERT INTO Flat
VALUES (23, 7074, 'Quarterly');
INSERT INTO Flat
VALUES (24, 7231, 'Quarterly');
INSERT INTO Flat
VALUES (25, 7455, 'Quarterly');
INSERT INTO Flat
VALUES (26, 3246, 'Quarterly');
INSERT INTO Flat
VALUES (27, 3957, 'Yearly');
INSERT INTO Flat
VALUES (28, 2829, 'Yearly');
INSERT INTO Flat
VALUES (29, 1198, 'Monthly');
INSERT INTO Flat
VALUES (30, 1451, 'Quarterly');
INSERT INTO Room
VALUES (1, 233, 7, 'Dining');
INSERT INTO Room
VALUES (2, 186, 17, 'Bedroom');
INSERT INTO Room
VALUES (3, 233, 1, 'Lounge');
INSERT INTO Room
VALUES (4, 155, 14, 'Kitchen');
INSERT INTO Room
VALUES (5, 135, 23, 'Bedroom');
INSERT INTO Room
VALUES (6, 188, 27, 'Dining');
INSERT INTO Room
VALUES (7, 60, 25, 'Lounge');
INSERT INTO Room
VALUES (8, 117, 8, 'Lounge');
INSERT INTO Room
VALUES (9, 233, 26, 'Kitchen');
INSERT INTO Room
VALUES (10, 55, 27, 'Kitchen');
INSERT INTO Room
VALUES (11, 202, 14, 'Kitchen');
INSERT INTO Room
VALUES (12, 176, 21, 'Dining');
INSERT INTO Room
VALUES (13, 124, 13, 'Kitchen');
INSERT INTO Room
VALUES (14, 182, 19, 'Kitchen');
INSERT INTO Room
VALUES (15, 158, 2, 'Kitchen');
INSERT INTO Room
VALUES (16, 94, 9, 'Bedroom');
INSERT INTO Room
VALUES (17, 141, 27, 'Dining');
INSERT INTO Room
VALUES (18, 232, 7, 'Lounge');
INSERT INTO Room
VALUES (19, 36, 13, 'Bedroom');
INSERT INTO Room
VALUES (20, 219, 4, 'Lounge');
INSERT INTO Room
VALUES (21, 122, 20, 'Dining');
INSERT INTO Room
VALUES (22, 189, 20, 'Bedroom');
INSERT INTO Room
VALUES (23, 181, 2, 'Bedroom');
INSERT INTO Room
VALUES (24, 203, 22, 'Bedroom');
INSERT INTO Room
VALUES (25, 219, 27, 'Lounge');
INSERT INTO Room
VALUES (26, 121, 8, 'Lounge');
INSERT INTO Room
VALUES (27, 103, 8, 'Dining');
INSERT INTO Room
VALUES (28, 57, 1, 'Lounge');
INSERT INTO Room
VALUES (29, 178, 22, 'Kitchen');
INSERT INTO Room
VALUES (30, 210, 19, 'Lounge');
INSERT INTO Room
VALUES (31, 79, 8, 'Bedroom');
INSERT INTO Room
VALUES (32, 105, 14, 'Dining');
INSERT INTO Room
VALUES (33, 188, 4, 'Bedroom');
INSERT INTO Room
VALUES (34, 200, 4, 'Kitchen');
INSERT INTO Room
VALUES (35, 197, 5, 'Lounge');
INSERT INTO Room
VALUES (36, 210, 18, 'Bedroom');
INSERT INTO Room
VALUES (37, 174, 2, 'Bedroom');
INSERT INTO Room
VALUES (38, 73, 30, 'Lounge');
INSERT INTO Room
VALUES (39, 192, 25, 'Kitchen');
INSERT INTO Room
VALUES (40, 226, 3, 'Dining');
INSERT INTO Room
VALUES (41, 77, 24, 'Bedroom');
INSERT INTO Room
VALUES (42, 32, 21, 'Dining');
INSERT INTO Room
VALUES (43, 90, 11, 'Dining');
INSERT INTO Room
VALUES (44, 88, 29, 'Lounge');
INSERT INTO Room
VALUES (45, 210, 5, 'Kitchen');
INSERT INTO Room
VALUES (46, 166, 16, 'Bedroom');
INSERT INTO Room
VALUES (47, 111, 28, 'Bedroom');
INSERT INTO Room
VALUES (48, 173, 23, 'Lounge');
INSERT INTO Room
VALUES (49, 229, 15, 'Kitchen');
INSERT INTO Room
VALUES (50, 69, 14, 'Bedroom');
INSERT INTO Room
VALUES (51, 80, 8, 'Bedroom');
INSERT INTO Room
VALUES (52, 91, 13, 'Bedroom');
INSERT INTO Room
VALUES (53, 211, 9, 'Dining');
INSERT INTO Room
VALUES (54, 87, 5, 'Kitchen');
INSERT INTO Room
VALUES (55, 43, 12, 'Bedroom');
INSERT INTO Room
VALUES (56, 160, 2, 'Dining');
INSERT INTO Room
VALUES (57, 67, 15, 'Kitchen');
INSERT INTO Room
VALUES (58, 143, 10, 'Dining');
INSERT INTO Room
VALUES (59, 220, 1, 'Bedroom');
INSERT INTO Room
VALUES (60, 119, 20, 'Kitchen');
INSERT INTO Room
VALUES (61, 203, 21, 'Bedroom');
INSERT INTO Room
VALUES (62, 129, 2, 'Dining');
INSERT INTO Room
VALUES (63, 228, 17, 'Bedroom');
INSERT INTO Room
VALUES (64, 142, 19, 'Bedroom');
INSERT INTO Room
VALUES (65, 188, 27, 'Bedroom');
INSERT INTO Room
VALUES (66, 58, 18, 'Lounge');
INSERT INTO Room
VALUES (67, 226, 24, 'Lounge');
INSERT INTO Room
VALUES (68, 53, 5, 'Lounge');
INSERT INTO Room
VALUES (69, 98, 1, 'Kitchen');
INSERT INTO Room
VALUES (70, 167, 28, 'Bedroom');
INSERT INTO Room
VALUES (71, 26, 12, 'Kitchen');
INSERT INTO Room
VALUES (72, 151, 27, 'Bedroom');
INSERT INTO Room
VALUES (73, 150, 30, 'Bedroom');
INSERT INTO Room
VALUES (74, 142, 10, 'Kitchen');
INSERT INTO Room
VALUES (75, 211, 20, 'Bedroom');
INSERT INTO Room
VALUES (76, 181, 4, 'Dining');
INSERT INTO Room
VALUES (77, 209, 8, 'Bedroom');
INSERT INTO Room
VALUES (78, 91, 26, 'Bedroom');
INSERT INTO Room
VALUES (79, 223, 24, 'Dining');
INSERT INTO Room
VALUES (80, 86, 22, 'Lounge');
INSERT INTO Room
VALUES (81, 40, 12, 'Kitchen');
INSERT INTO Room
VALUES (82, 197, 11, 'Dining');
INSERT INTO Room
VALUES (83, 57, 27, 'Bedroom');
INSERT INTO Room
VALUES (84, 64, 16, 'Kitchen');
INSERT INTO Room
VALUES (85, 202, 1, 'Bedroom');
INSERT INTO Room
VALUES (86, 63, 18, 'Dining');
INSERT INTO Room
VALUES (87, 162, 26, 'Bedroom');
INSERT INTO Room
VALUES (88, 77, 29, 'Bedroom');
INSERT INTO Room
VALUES (89, 68, 27, 'Kitchen');
INSERT INTO Room
VALUES (90, 82, 6, 'Kitchen');
INSERT INTO Room
VALUES (91, 138, 19, 'Kitchen');
INSERT INTO Room
VALUES (92, 117, 2, 'Dining');
INSERT INTO Room
VALUES (93, 125, 22, 'Kitchen');
INSERT INTO Room
VALUES (94, 93, 17, 'Dining');
INSERT INTO Room
VALUES (95, 30, 25, 'Bedroom');
INSERT INTO Room
VALUES (96, 122, 14, 'Dining');
INSERT INTO Room
VALUES (97, 175, 21, 'Dining');
INSERT INTO Room
VALUES (98, 185, 23, 'Lounge');
INSERT INTO Room
VALUES (99, 213, 2, 'Bedroom');
INSERT INTO Room
VALUES (100, 145, 1, 'Dining');
INSERT INTO Room
VALUES (101, 178, 30, 'Lounge');
INSERT INTO Room
VALUES (102, 74, 2, 'Dining');
INSERT INTO Room
VALUES (103, 26, 13, 'Kitchen');
INSERT INTO Room
VALUES (104, 56, 10, 'Kitchen');
INSERT INTO Room
VALUES (105, 69, 3, 'Lounge');
INSERT INTO Room
VALUES (106, 220, 4, 'Bedroom');
INSERT INTO Room
VALUES (107, 33, 25, 'Lounge');
INSERT INTO Room
VALUES (108, 144, 15, 'Kitchen');
INSERT INTO Room
VALUES (109, 193, 9, 'Bedroom');
INSERT INTO Room
VALUES (110, 113, 1, 'Kitchen');
INSERT INTO Room
VALUES (111, 222, 13, 'Dining');
INSERT INTO Room
VALUES (112, 43, 3, 'Lounge');
INSERT INTO Room
VALUES (113, 231, 18, 'Bedroom');
INSERT INTO Room
VALUES (114, 235, 19, 'Kitchen');
INSERT INTO Room
VALUES (115, 35, 23, 'Kitchen');
INSERT INTO Room
VALUES (116, 120, 27, 'Kitchen');
INSERT INTO Room
VALUES (117, 51, 14, 'Bedroom');
INSERT INTO Room
VALUES (118, 141, 9, 'Dining');
INSERT INTO Room
VALUES (119, 218, 12, 'Kitchen');
INSERT INTO Room
VALUES (120, 42, 9, 'Dining');
INSERT INTO Room
VALUES (121, 116, 30, 'Kitchen');
INSERT INTO Room
VALUES (122, 179, 10, 'Bedroom');
INSERT INTO Room
VALUES (123, 57, 6, 'Kitchen');
INSERT INTO Room
VALUES (124, 37, 4, 'Bedroom');
INSERT INTO Room
VALUES (125, 145, 15, 'Bedroom');
INSERT INTO Room
VALUES (126, 190, 26, 'Kitchen');
INSERT INTO Room
VALUES (127, 229, 16, 'Lounge');
INSERT INTO Room
VALUES (128, 81, 17, 'Bedroom');
INSERT INTO Room
VALUES (129, 166, 21, 'Kitchen');
INSERT INTO Room
VALUES (130, 30, 2, 'Bedroom');
INSERT INTO Room
VALUES (131, 165, 28, 'Kitchen');
INSERT INTO Room
VALUES (132, 199, 9, 'Lounge');
INSERT INTO Room
VALUES (133, 209, 1, 'Dining');
INSERT INTO Room
VALUES (134, 141, 12, 'Lounge');
INSERT INTO Room
VALUES (135, 197, 18, 'Bedroom');
INSERT INTO Room
VALUES (136, 218, 30, 'Bedroom');
INSERT INTO Room
VALUES (137, 229, 30, 'Kitchen');
INSERT INTO Room
VALUES (138, 148, 27, 'Kitchen');
INSERT INTO Room
VALUES (139, 130, 10, 'Bedroom');
INSERT INTO Room
VALUES (140, 93, 5, 'Bedroom');
INSERT INTO Room
VALUES (141, 72, 30, 'Dining');
INSERT INTO Room
VALUES (142, 92, 19, 'Dining');
INSERT INTO Room
VALUES (143, 200, 18, 'Lounge');
INSERT INTO Room
VALUES (144, 151, 5, 'Lounge');
INSERT INTO Room
VALUES (145, 61, 30, 'Dining');
INSERT INTO Room
VALUES (146, 140, 28, 'Bedroom');
INSERT INTO Room
VALUES (147, 167, 18, 'Bedroom');
INSERT INTO Room
VALUES (148, 138, 8, 'Lounge');
INSERT INTO Room
VALUES (149, 127, 27, 'Kitchen');
INSERT INTO Room
VALUES (150, 63, 24, 'Bedroom');
INSERT INTO Room
VALUES (151, 219, 17, 'Kitchen');
INSERT INTO Room
VALUES (152, 200, 8, 'Bedroom');
INSERT INTO Room
VALUES (153, 122, 4, 'Bedroom');
INSERT INTO Room
VALUES (154, 231, 17, 'Dining');
INSERT INTO Room
VALUES (155, 128, 23, 'Bedroom');
INSERT INTO Room
VALUES (156, 151, 24, 'Lounge');
INSERT INTO Room
VALUES (157, 147, 1, 'Bedroom');
INSERT INTO Room
VALUES (158, 81, 20, 'Kitchen');
INSERT INTO Room
VALUES (159, 123, 7, 'Kitchen');
INSERT INTO Room
VALUES (160, 207, 11, 'Bedroom');
INSERT INTO Room
VALUES (161, 67, 13, 'Bedroom');
INSERT INTO Room
VALUES (162, 48, 1, 'Bedroom');
INSERT INTO Room
VALUES (163, 129, 12, 'Bedroom');
INSERT INTO Room
VALUES (164, 168, 26, 'Lounge');
INSERT INTO Room
VALUES (165, 128, 28, 'Bedroom');
INSERT INTO Room
VALUES (166, 213, 8, 'Bedroom');
INSERT INTO Room
VALUES (167, 131, 28, 'Dining');
INSERT INTO Room
VALUES (168, 182, 22, 'Kitchen');
INSERT INTO Room
VALUES (169, 222, 26, 'Dining');
INSERT INTO Room
VALUES (170, 116, 6, 'Dining');
INSERT INTO Room
VALUES (171, 95, 5, 'Lounge');
INSERT INTO Room
VALUES (172, 76, 3, 'Kitchen');
INSERT INTO Room
VALUES (173, 230, 16, 'Bedroom');
INSERT INTO Room
VALUES (174, 139, 26, 'Bedroom');
INSERT INTO Room
VALUES (175, 79, 10, 'Bedroom');
INSERT INTO Room
VALUES (176, 29, 19, 'Kitchen');
INSERT INTO Room
VALUES (177, 120, 13, 'Lounge');
INSERT INTO Room
VALUES (178, 113, 17, 'Bedroom');
INSERT INTO Room
VALUES (179, 111, 9, 'Dining');
INSERT INTO Room
VALUES (180, 169, 11, 'Lounge');
INSERT INTO Room
VALUES (181, 173, 1, 'Bedroom');
INSERT INTO Room
VALUES (182, 229, 25, 'Bedroom');
INSERT INTO Room
VALUES (183, 65, 15, 'Bedroom');
INSERT INTO Room
VALUES (184, 113, 25, 'Bedroom');
INSERT INTO Room
VALUES (185, 181, 19, 'Bedroom');
INSERT INTO Room
VALUES (186, 144, 9, 'Bedroom');
INSERT INTO Room
VALUES (187, 59, 19, 'Dining');
INSERT INTO Room
VALUES (188, 225, 10, 'Kitchen');
INSERT INTO Room
VALUES (189, 71, 12, 'Dining');
INSERT INTO Room
VALUES (190, 110, 27, 'Bedroom');
INSERT INTO Room
VALUES (191, 173, 16, 'Dining');
INSERT INTO Room
VALUES (192, 156, 21, 'Bedroom');
INSERT INTO Room
VALUES (193, 161, 11, 'Dining');
INSERT INTO Room
VALUES (194, 25, 15, 'Lounge');
INSERT INTO Room
VALUES (195, 226, 16, 'Bedroom');
INSERT INTO Room
VALUES (196, 129, 14, 'Bedroom');
INSERT INTO Room
VALUES (197, 182, 5, 'Bedroom');
INSERT INTO Room
VALUES (198, 43, 14, 'Bedroom');
INSERT INTO Room
VALUES (199, 207, 26, 'Dining');
INSERT INTO Room
VALUES (200, 40, 10, 'Lounge');
INSERT INTO Room
VALUES (201, 149, 1, 'Bedroom');
INSERT INTO Room
VALUES (202, 94, 7, 'Dining');
INSERT INTO Room
VALUES (203, 153, 21, 'Dining');
INSERT INTO Room
VALUES (204, 171, 6, 'Dining');
INSERT INTO Room
VALUES (205, 88, 29, 'Bedroom');
INSERT INTO Room
VALUES (206, 189, 8, 'Bedroom');
INSERT INTO Room
VALUES (207, 217, 10, 'Bedroom');
INSERT INTO Room
VALUES (208, 179, 1, 'Bedroom');
INSERT INTO Room
VALUES (209, 79, 30, 'Lounge');
INSERT INTO Room
VALUES (210, 233, 16, 'Bedroom');
INSERT INTO Room
VALUES (211, 172, 13, 'Bedroom');
INSERT INTO Room
VALUES (212, 106, 3, 'Bedroom');
INSERT INTO Room
VALUES (213, 77, 21, 'Kitchen');
INSERT INTO Room
VALUES (214, 85, 6, 'Bedroom');
INSERT INTO Room
VALUES (215, 226, 25, 'Bedroom');
INSERT INTO Room
VALUES (216, 82, 23, 'Lounge');
INSERT INTO Room
VALUES (217, 44, 28, 'Lounge');
INSERT INTO Room
VALUES (218, 61, 4, 'Bedroom');
INSERT INTO Room
VALUES (219, 225, 26, 'Bedroom');
INSERT INTO Room
VALUES (220, 151, 19, 'Kitchen');
INSERT INTO Room
VALUES (221, 110, 15, 'Kitchen');
INSERT INTO Room
VALUES (222, 55, 5, 'Kitchen');
INSERT INTO Room
VALUES (223, 189, 18, 'Bedroom');
INSERT INTO Room
VALUES (224, 191, 8, 'Dining');
INSERT INTO Room
VALUES (225, 205, 26, 'Kitchen');
INSERT INTO Room
VALUES (226, 79, 4, 'Kitchen');
INSERT INTO Room
VALUES (227, 115, 21, 'Bedroom');
INSERT INTO Room
VALUES (228, 180, 24, 'Kitchen');
INSERT INTO Room
VALUES (229, 204, 23, 'Dining');
INSERT INTO Room
VALUES (230, 235, 24, 'Lounge');
INSERT INTO Room
VALUES (231, 233, 4, 'Lounge');
INSERT INTO Room
VALUES (232, 128, 28, 'Lounge');
INSERT INTO Room
VALUES (233, 60, 3, 'Dining');
INSERT INTO Room
VALUES (234, 34, 29, 'Bedroom');
INSERT INTO Room
VALUES (235, 83, 2, 'Kitchen');
INSERT INTO Room
VALUES (236, 217, 5, 'Bedroom');
INSERT INTO Room
VALUES (237, 27, 4, 'Bedroom');
INSERT INTO Room
VALUES (238, 106, 10, 'Bedroom');
INSERT INTO Room
VALUES (239, 77, 26, 'Bedroom');
INSERT INTO Room
VALUES (240, 166, 11, 'Bedroom');
INSERT INTO Room
VALUES (241, 35, 28, 'Dining');
INSERT INTO Room
VALUES (242, 69, 4, 'Bedroom');
INSERT INTO Room
VALUES (243, 149, 7, 'Lounge');
INSERT INTO Room
VALUES (244, 166, 15, 'Kitchen');
INSERT INTO Room
VALUES (245, 218, 27, 'Bedroom');
INSERT INTO Room
VALUES (246, 34, 11, 'Bedroom');
INSERT INTO Room
VALUES (247, 209, 3, 'Dining');
INSERT INTO Room
VALUES (248, 94, 10, 'Bedroom');
INSERT INTO Room
VALUES (249, 120, 19, 'Bedroom');
INSERT INTO Room
VALUES (250, 159, 27, 'Bedroom');
INSERT INTO User
VALUES (NULL, 31, 21, 'Dawn', 'Carr');
INSERT INTO User
VALUES (NULL, 32, 18, 'Nigel', 'Hopkins');
INSERT INTO User
VALUES (NULL, 33, 64, 'Gerald', 'Jordan');
INSERT INTO User
VALUES (NULL, 34, 34, 'Katherine', 'Ford');
INSERT INTO User
VALUES (NULL, 35, 64, 'Leonard', 'Wells');
INSERT INTO User
VALUES (NULL, 36, 63, 'Jack', 'Kirby');
INSERT INTO User
VALUES (NULL, 37, 42, 'Stacey', 'Gray');
INSERT INTO User
VALUES (NULL, 38, 60, 'Ian', 'Rhodes');
INSERT INTO User
VALUES (NULL, 39, 72, 'Janet', 'Hawkins');
INSERT INTO User
VALUES (NULL, 40, 70, 'Amy', 'Scott');
INSERT INTO User
VALUES (NULL, 41, 28, 'Katy', 'Douglas');
INSERT INTO User
VALUES (NULL, 42, 24, 'Adam', 'Nixon');
INSERT INTO User
VALUES (NULL, 43, 60, 'Wayne', 'Coles');
INSERT INTO User
VALUES (NULL, 44, 32, 'Keith', 'Sullivan');
INSERT INTO User
VALUES (NULL, 45, 47, 'Jeffrey', 'Mitchell');
INSERT INTO Click
VALUES (1, '2019-12-19 04:28:28', 8, 1);
INSERT INTO Click
VALUES (2, '2019-05-19 18:51:38', 23, 7);
INSERT INTO Click
VALUES (3, '2019-09-11 12:20:57', 29, 12);
INSERT INTO Click
VALUES (4, '2019-09-25 07:30:20', 28, 2);
INSERT INTO Click
VALUES (5, '2019-12-29 18:59:49', 28, 12);
INSERT INTO Click
VALUES (6, '2019-08-07 13:41:36', 30, 7);
INSERT INTO Click
VALUES (7, '2019-02-02 22:45:35', 15, 9);
INSERT INTO Click
VALUES (8, '2019-09-05 19:49:42', 26, 10);
INSERT INTO Click
VALUES (9, '2019-11-25 05:57:22', 13, 5);
INSERT INTO Click
VALUES (10, '2019-07-19 13:46:17', 12, 5);
INSERT INTO Click
VALUES (11, '2019-10-11 17:35:11', 20, 11);
INSERT INTO Click
VALUES (12, '2019-08-21 05:34:36', 21, 10);
INSERT INTO Click
VALUES (13, '2019-10-07 12:20:23', 5, 5);
INSERT INTO Click
VALUES (14, '2019-04-18 16:02:33', 10, 6);
INSERT INTO Click
VALUES (15, '2019-10-21 20:52:55', 15, 1);
INSERT INTO Click
VALUES (16, '2019-03-16 13:21:06', 20, 10);
INSERT INTO Click
VALUES (17, '2019-08-02 22:14:42', 8, 5);
INSERT INTO Click
VALUES (18, '2019-02-22 11:57:15', 14, 9);
INSERT INTO Click
VALUES (19, '2019-10-10 19:17:03', 12, 14);
INSERT INTO Click
VALUES (20, '2019-07-01 13:00:36', 22, 12);
INSERT INTO Click
VALUES (21, '2019-12-05 20:17:11', 20, 9);
INSERT INTO Click
VALUES (22, '2019-12-20 12:12:43', 5, 6);
INSERT INTO Click
VALUES (23, '2019-10-24 19:02:34', 28, 8);
INSERT INTO Click
VALUES (24, '2019-08-18 12:33:28', 4, 15);
INSERT INTO Click
VALUES (25, '2019-04-06 12:59:00', 4, 15);
INSERT INTO Click
VALUES (26, '2019-12-05 01:43:10', 24, 13);
INSERT INTO Click
VALUES (27, '2019-03-08 22:56:24', 13, 3);
INSERT INTO Click
VALUES (28, '2019-12-23 04:55:23', 21, 3);
INSERT INTO Click
VALUES (29, '2019-02-19 10:14:53', 6, 7);
INSERT INTO Click
VALUES (30, '2019-07-19 16:13:33', 16, 15);
INSERT INTO Click
VALUES (31, '2019-08-03 14:57:39', 4, 4);
INSERT INTO Click
VALUES (32, '2019-12-20 22:39:44', 13, 8);
INSERT INTO Click
VALUES (33, '2019-08-29 03:21:36', 20, 13);
INSERT INTO Click
VALUES (34, '2019-07-16 15:56:47', 7, 2);
INSERT INTO Click
VALUES (35, '2019-01-01 09:45:28', 13, 10);
INSERT INTO Click
VALUES (36, '2019-03-31 15:31:44', 12, 12);
INSERT INTO Click
VALUES (37, '2019-08-31 16:13:35', 21, 11);
INSERT INTO Click
VALUES (38, '2019-01-25 16:26:18', 21, 14);
INSERT INTO Click
VALUES (39, '2019-08-13 05:46:33', 26, 2);
INSERT INTO Click
VALUES (40, '2019-02-06 04:30:16', 6, 6);
INSERT INTO Click
VALUES (41, '2019-07-24 21:24:44', 7, 6);
INSERT INTO Click
VALUES (42, '2019-09-23 18:27:15', 2, 2);
INSERT INTO Click
VALUES (43, '2019-06-01 16:54:29', 7, 9);
INSERT INTO Click
VALUES (44, '2019-03-31 00:25:51', 7, 2);
INSERT INTO Click
VALUES (45, '2019-10-01 14:46:33', 8, 9);
INSERT INTO Click
VALUES (46, '2019-04-04 14:46:16', 2, 1);
INSERT INTO Click
VALUES (47, '2019-05-17 09:21:51', 15, 1);
INSERT INTO Click
VALUES (48, '2019-03-24 14:43:07', 24, 5);
INSERT INTO Click
VALUES (49, '2019-03-09 17:31:50', 12, 6);
INSERT INTO Click
VALUES (50, '2019-06-07 22:53:00', 2, 11);
INSERT INTO Click
VALUES (51, '2019-06-07 12:04:10', 12, 2);
INSERT INTO Click
VALUES (52, '2019-11-08 13:06:08', 17, 4);
INSERT INTO Click
VALUES (53, '2019-02-26 12:20:44', 14, 3);
INSERT INTO Click
VALUES (54, '2019-07-16 19:58:12', 1, 1);
INSERT INTO Click
VALUES (55, '2019-07-29 10:08:06', 15, 5);
INSERT INTO Click
VALUES (56, '2019-04-14 19:43:10', 21, 1);
INSERT INTO Click
VALUES (57, '2019-11-04 12:46:13', 11, 3);
INSERT INTO Click
VALUES (58, '2019-07-09 07:41:04', 15, 14);
INSERT INTO Click
VALUES (59, '2019-10-20 02:41:41', 28, 11);
INSERT INTO Click
VALUES (60, '2019-06-02 22:54:12', 3, 11);
INSERT INTO Click
VALUES (61, '2019-10-09 22:03:03', 2, 15);
INSERT INTO Click
VALUES (62, '2019-07-21 23:59:52', 12, 14);
INSERT INTO Click
VALUES (63, '2019-07-15 05:07:53', 17, 2);
INSERT INTO Click
VALUES (64, '2019-10-04 13:17:16', 10, 4);
INSERT INTO Click
VALUES (65, '2019-02-20 00:12:42', 25, 8);
INSERT INTO Click
VALUES (66, '2019-02-12 08:38:23', 10, 15);
INSERT INTO Click
VALUES (67, '2019-05-03 19:51:50', 27, 12);
INSERT INTO Click
VALUES (68, '2019-05-08 04:23:30', 8, 5);
INSERT INTO Click
VALUES (69, '2019-09-07 03:20:57', 10, 5);
INSERT INTO Click
VALUES (70, '2019-10-04 03:09:27', 12, 13);
INSERT INTO Click
VALUES (71, '2019-02-21 23:54:09', 2, 2);
INSERT INTO Click
VALUES (72, '2019-02-07 19:36:41', 6, 3);
INSERT INTO Click
VALUES (73, '2019-05-09 02:27:40', 2, 1);
INSERT INTO Click
VALUES (74, '2019-09-28 19:53:42', 26, 12);
INSERT INTO Click
VALUES (75, '2019-07-06 04:31:54', 22, 8);
INSERT INTO Click
VALUES (76, '2019-05-14 00:23:08', 2, 8);
INSERT INTO Click
VALUES (77, '2019-01-28 09:47:05', 4, 14);
INSERT INTO Click
VALUES (78, '2019-06-17 12:55:12', 1, 13);
INSERT INTO Click
VALUES (79, '2019-02-02 16:09:50', 4, 6);
INSERT INTO Click
VALUES (80, '2019-08-28 15:43:33', 15, 2);
INSERT INTO Click
VALUES (81, '2019-02-20 08:37:37', 22, 5);
INSERT INTO Click
VALUES (82, '2019-07-14 22:56:52', 17, 11);
INSERT INTO Click
VALUES (83, '2019-01-29 21:32:56', 9, 14);
INSERT INTO Click
VALUES (84, '2019-05-28 17:10:39', 9, 6);
INSERT INTO Click
VALUES (85, '2019-06-07 17:11:00', 9, 15);
INSERT INTO Click
VALUES (86, '2019-04-27 06:16:17', 21, 3);
INSERT INTO Click
VALUES (87, '2019-07-24 14:22:10', 4, 4);
INSERT INTO Click
VALUES (88, '2019-08-12 02:37:40', 8, 14);
INSERT INTO Click
VALUES (89, '2019-04-11 07:10:41', 30, 11);
INSERT INTO Click
VALUES (90, '2019-11-09 19:20:20', 2, 1);
INSERT INTO Click
VALUES (91, '2019-11-29 13:35:46', 21, 12);
INSERT INTO Click
VALUES (92, '2019-10-01 08:26:01', 26, 2);
INSERT INTO Click
VALUES (93, '2019-09-29 15:28:13', 24, 6);
INSERT INTO Click
VALUES (94, '2019-12-30 08:59:18', 12, 11);
INSERT INTO Click
VALUES (95, '2019-01-06 06:16:25', 5, 12);
INSERT INTO Click
VALUES (96, '2019-02-06 08:14:03', 21, 14);
INSERT INTO Click
VALUES (97, '2019-03-22 13:43:56', 13, 7);