1 | insert into users(password,first_name,last_name,address,contact_number,date_created) values
|
---|
2 | ('123','Denica','Kjorvezir','VidoeS','078705224',now()),
|
---|
3 | ('1234','Den','Kjor','VidoeSmilev','078705225',now()),
|
---|
4 | ('2355','Matej','Jordanovski','Asnom','070640840',now()),
|
---|
5 | ('1233','Lile','Liljanovska','VidoeS','078744444',now()),
|
---|
6 | ('123554','Mile','Milovski','VidoeS','070322111',now()),
|
---|
7 | ('123453','Stefan','Stefanovski','Karposh','071222333',now()),
|
---|
8 | ('123534','Mirka','Mirkovska','VidoeS','077443222',now());
|
---|
9 |
|
---|
10 | insert into cinemas(name,location) values
|
---|
11 | ('Plex','CityMall'),
|
---|
12 | ('Kinoteka','MKC'),
|
---|
13 | ('Kino Karpos','Karposh');
|
---|
14 |
|
---|
15 | insert into workers(ID_worker,position,work_hours_from,work_hours_to,ID_cinema) values
|
---|
16 | (1,'cleaner','8','17',2),
|
---|
17 | (2,'cashier','8','17',3),
|
---|
18 | (3,'menager','9','18',1);
|
---|
19 |
|
---|
20 | insert into customers(ID_customer) values
|
---|
21 | (4),(5),(6),(7);
|
---|
22 |
|
---|
23 | insert into salaries(sum,ID_worker,date_from) values
|
---|
24 | (20000,1,now()),
|
---|
25 | (33000,2,now()),
|
---|
26 | (40000,3,now());
|
---|
27 |
|
---|
28 | insert into films(name,duration,actors,genre,age_category,director,start_date,end_date) values
|
---|
29 | ('The ShawshankRedemption',142,'Tim Robbins,Morgan Freeman','drama','R','Frank Darabont',now(),now()+interval'2 months'),
|
---|
30 | ('The Godfather',175,'Marlon Brando, Al Pacino','crime,drama','R','Francis Ford Coppola',now(),now()+interval'2 weeks'),
|
---|
31 | ('The Dark Knight',152,'Christian Bale,Heath Ledger','action,crime,drama','PG-13','Christopher Nolan',now(),now()+interval'2 months'),
|
---|
32 | ('Pulp Fiction',154,'Jhon Travolta,Uma Thurman','crime,drama','R','Quentin Tarantino',now(),now()+interval'1 months'),
|
---|
33 | ('The Lord of the Rings:The Fellowship of the Ring',178,'Elijah Wood,Ian McKellen,Orlando Bloom','action,adventture,drama','PG-13','Peter Jackson',now(),now()+interval'2 months');
|
---|
34 |
|
---|
35 | insert into events(theme,duration,repeating,start_date) values
|
---|
36 | ('birthday',120,'no',now()),
|
---|
37 | ('Marvel Marathon',360,'no',now()),
|
---|
38 | ('Ladies Night',120,'every week',now());
|
---|
39 |
|
---|
40 | insert into discounts(validity,code,type,percent) values
|
---|
41 | (now()+interval '1 month','DFL2','student',20),
|
---|
42 | (now()+interval '2 months','MARVEL','everyone',10),
|
---|
43 | (now()+interval '3 weeks','KKLOP','everyone',5);
|
---|
44 |
|
---|
45 | insert into projections(date_time_start,type_of_technology,date_time_end,ID_film,ID_discount,ID_event) values
|
---|
46 | (now(),'3D',now()+interval '2 hours 22 minutes',1,3,null),
|
---|
47 | (now()+interval '1 week','2D',now()+interval '2 hours 55 minutes',2,null,null),
|
---|
48 | (now()-interval '1 week','2D',now()+interval '2 hours 32 minutes',3,1,null),
|
---|
49 | (now(),'3D',now()+interval '2 hours 22 minutes',3,3,3),
|
---|
50 | (now()+interval '2 week','2D',now()+interval '2 hours 55 minutes',2,null,null),
|
---|
51 | (now()-interval '2 week 1 day','2D',now()+interval '2 hours 32 minutes',3,1,null),
|
---|
52 | (now()+interval '3 days','3D',now()+interval '2 hours 34 minutes',4,3,null),
|
---|
53 | (now()+interval '1 week','2D',now()+interval '2 hours 58 minutes',5,1,null),
|
---|
54 | (now()-interval '1 week','2D',now()+interval '2 hours 58 minutes',5,3,1);
|
---|
55 |
|
---|
56 | insert into projection_rooms(number_of_seats,projection_room_number,ID_cinema) values
|
---|
57 | (30,1,1),
|
---|
58 | (35,2,1),
|
---|
59 | (50,3,1),
|
---|
60 | (55,4,1),
|
---|
61 | (40,1,2),
|
---|
62 | (60,2,2),
|
---|
63 | (20,3,2),
|
---|
64 | (52,1,3),
|
---|
65 | (54,2,3),
|
---|
66 | (65,3,3);
|
---|
67 |
|
---|
68 | insert into categories(name,extra_amount) values
|
---|
69 | ('love seats',50),
|
---|
70 | ('disablility',0),
|
---|
71 | ('no category',0),
|
---|
72 | ('vip',200);
|
---|
73 |
|
---|
74 | insert into seats(seat_number,ID_room,ID_category) values
|
---|
75 | (22,1,3),(15,1,3),(23,1,3),(16,1,1),(13,1,3),(14,1,2),(21,1,4),
|
---|
76 | (22,2,1),(15,2,3),(1,2,2),(16,2,3),(24,2,3),(30,2,4);
|
---|
77 |
|
---|
78 | insert into tickets(price,date_reserved,ID_customer,ID_projection,ID_seat) values
|
---|
79 | (350,now(),4,3,2),
|
---|
80 | (450,now()-interval'1 week',7,1,3),
|
---|
81 | (350,now()-interval'2 days',5,2,5),
|
---|
82 | (250,now()-interval'4 days',6,3,6);
|
---|
83 |
|
---|
84 | insert into project.customer_rates_film (ID_customer,ID_film,rating) values
|
---|
85 | (4,1,5),
|
---|
86 | (5,2,4.5),
|
---|
87 | (6,3,3);
|
---|
88 |
|
---|
89 | insert into project.cinema_plays_film(ID_cinema,ID_film) values
|
---|
90 | (1,1),(2,1),(3,1),(2,2),(2,3),(2,4),(3,5),(3,2);
|
---|
91 |
|
---|
92 | insert into project.cinema_organizes_event(ID_cinema,id_event) values
|
---|
93 | (1,2),(2,2),(3,3);
|
---|
94 |
|
---|
95 | insert into project.projection_is_played_in_room(ID_projection,ID_room) values
|
---|
96 | (1,1),(2,3),(4,3),(5,5);
|
---|
97 |
|
---|
98 | insert into customer_is_interested_in_event(id_customer,id_event) values
|
---|
99 | (4,1),(4,2),(5,1),(5,3),(6,2);
|
---|
100 |
|
---|
101 | insert into work_hours_weekly(id_worker,week_number,year_num,hours_from,hours_to) values
|
---|
102 | (1,to_char(now(),'WW')::int,extract(year from now()),to_timestamp('08:00','HH24:MI'),to_timestamp('16:00','HH24:MI')),
|
---|
103 | (1,to_char(now()+interval '1 week','WW')::int,extract(year from now()+interval '1 week'),to_timestamp('16:00','HH24:MI'),to_timestamp('00:00','HH24:MI')),
|
---|
104 | (1,to_char(now()+interval '2 week','WW')::int,extract(year from now()+interval '2 week'),to_timestamp('00:00','HH24:MI'),to_timestamp('04:00','HH24:MI'));
|
---|