1 | set search_path = project;
|
---|
2 |
|
---|
3 | INSERT INTO Lugje (l_ime, l_prezime, l_adresa, l_telefon, l_email, l_embg, l_is_admin, l_lozinka)
|
---|
4 | VALUES
|
---|
5 | ('Pavel', 'Paunovski', 'Aerodrom 123', '075500000', 'john.doe@example.com', '1610002450450', false, 'pp'),
|
---|
6 | ('Darko', 'Sekulovski', 'Gjorce 123', '076500000', 'jane.smith@example.com', '0403002450450', false, 'ds'),
|
---|
7 | ('Petar', 'Gruevski', 'Dracevo 123', '077500000', 'bob.johnson@example.com', '1305002450450', false, 'pg'),
|
---|
8 | ('Vangel', 'Ajanovski', 'Finki 123', '078500000', 'bob.johnson@example.com', '1212975450450', true, 'va');
|
---|
9 |
|
---|
10 |
|
---|
11 | INSERT INTO Patnik (l_id) VALUES (1);
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 | INSERT INTO Vraboten (l_id, v_plata, v_datum_na_vrabotuvanje, v_datum_prekin_vrabotuvanje)
|
---|
16 | VALUES
|
---|
17 | (2, 70000.00, '2020-04-01', NULL),
|
---|
18 | (3, 65000.00, '2020-05-01', NULL);
|
---|
19 |
|
---|
20 |
|
---|
21 |
|
---|
22 | INSERT INTO Vozac (l_id) VALUES (3);
|
---|
23 | insert into Kondukter(l_id) values (2);
|
---|
24 |
|
---|
25 | INSERT INTO Dokument (d_broj_na_dokumnet, d_datum_na_izdavanje, d_datum_ist, d_koj_go_izdal, l_id)
|
---|
26 | VALUES
|
---|
27 | ('ABC123', '2023-01-01', '2023-12-31', 'Government', 1),
|
---|
28 | ('XYZ456', '2023-02-01', '2023-11-30', 'Company XYZ', 2),
|
---|
29 | ('123DEF', '2023-03-01', '2023-10-31', 'Authority ABC', 3);
|
---|
30 |
|
---|
31 | INSERT INTO Avtobus (a_registracija, a_seriski_broj, a_broj_sedista)
|
---|
32 | VALUES
|
---|
33 | ('ABC12345', 'ABC987654', 50),
|
---|
34 | ('XYZ54321', 'XYZ123456', 45),
|
---|
35 | ('123ABCD', '123XYZ789', 55),
|
---|
36 | ('456DEFG', '456XYZ789', 40),
|
---|
37 | ('789HIJK', '789XYZ123', 60);
|
---|
38 |
|
---|
39 | INSERT INTO Linija (li_id, li_ime)
|
---|
40 | VALUES
|
---|
41 | (1, 'Line 1'),
|
---|
42 | (2, 'Line 2'),
|
---|
43 | (3, 'Line 3'),
|
---|
44 | (4, 'Line 4'),
|
---|
45 | (5, 'Line 5');
|
---|
46 |
|
---|
47 | INSERT INTO DnevniRuti (dr_datum, vozac_l_id, a_registracija, li_id)
|
---|
48 | VALUES
|
---|
49 | ('2023-01-01', 3, 'ABC12345', 1),
|
---|
50 | ('2023-02-01', 3, 'XYZ54321', 2),
|
---|
51 | ('2023-03-01', 3, '123ABCD', 3),
|
---|
52 | ('2023-04-01', 3, '456DEFG', 4),
|
---|
53 | ('2023-05-01', 3, '789HIJK', 5);
|
---|
54 |
|
---|
55 | INSERT INTO Mesto (m_grad, m_opstina, m_ulica)
|
---|
56 | VALUES
|
---|
57 | ('Skopje', 'Aerodrom', 'Lake Street 2'),
|
---|
58 | ('Skopje', 'Aerodrom', 'Mountain Street 3'),
|
---|
59 | ('Skopje', 'Aerodrom', 'Valley Street 4'),
|
---|
60 | ('Skopje', 'Aerodrom', 'River Street 5'),
|
---|
61 | ('Skopje', 'Aerodrom', 'Mountain Avenue 12'),
|
---|
62 | ('Skopje', 'Aerodrom', 'Valley Lane 8'),
|
---|
63 | ('Skopje', 'Aerodrom', 'Ocean View 3'),
|
---|
64 | ('Skopje', 'Aerodrom', 'Forest Drive 7'),
|
---|
65 | ('Skopje', 'Aerodrom', 'Sunset Boulevard 10'),
|
---|
66 | ('Skopje', 'Aerodrom', 'Meadow Street 21'),
|
---|
67 | ('Skopje', 'Aerodrom', 'Highland Place 14'),
|
---|
68 | ('Skopje', 'Aerodrom', 'Hillside Road 19'),
|
---|
69 | ('Skopje', 'Aerodrom', 'Lake Shore 6'),
|
---|
70 | ('Skopje', 'Aerodrom', 'Park Avenue 25'),
|
---|
71 | ('Skopje', 'Aerodrom', 'Creek Side 17'),
|
---|
72 | ('Skopje', 'Aerodrom', 'Greenway 4'),
|
---|
73 | ('Skopje', 'Aerodrom', 'Ridge Street 11'),
|
---|
74 | ('Skopje', 'Aerodrom', 'Harbor View 9'),
|
---|
75 | ('Skopje', 'Aerodrom', 'Maple Lane 13'),
|
---|
76 | ('Skopje', 'Aerodrom', 'Pinecrest 16'),
|
---|
77 | ('Skopje', 'Centar', 'Mountain Ridge 5'),
|
---|
78 | ('Skopje', 'Centar', 'Valley Court 8'),
|
---|
79 | ('Skopje', 'Centar', 'Riverfront Avenue 11'),
|
---|
80 | ('Skopje', 'Centar', 'Forest View 7'),
|
---|
81 | ('Skopje', 'Centar', 'Sunset Plaza 10'),
|
---|
82 | ('Skopje', 'Centar', 'Meadow Lane 21'),
|
---|
83 | ('Skopje', 'Centar', 'Highland Terrace 14'),
|
---|
84 | ('Skopje', 'Centar', 'Hillside Place 19'),
|
---|
85 | ('Skopje', 'Centar', 'Lakeview Drive 6'),
|
---|
86 | ('Skopje', 'Centar', 'Parkside Circle 25'),
|
---|
87 | ('Skopje', 'Centar', 'Creek Road 17'),
|
---|
88 | ('Skopje', 'Centar', 'Greenwood Street 4'),
|
---|
89 | ('Skopje', 'Centar', 'Ridgeview Court 13'),
|
---|
90 | ('Skopje', 'Centar', 'Harbor Lane 9'),
|
---|
91 | ('Skopje', 'Centar', 'Maple Grove 16'),
|
---|
92 | ('Skopje', 'Centar', 'Pineview Avenue 22'),
|
---|
93 | ('Skopje', 'Centar', 'Riverside Terrace 18'),
|
---|
94 | ('Skopje', 'Centar', 'Blossom Lane 23'),
|
---|
95 | ('Skopje', 'Centar', 'Winding Street 20'),
|
---|
96 | ('Skopje', 'Centar', 'Sunnyvale Place 15'),
|
---|
97 | ('Skopje', 'Karposh', 'Mountain Summit 27'),
|
---|
98 | ('Skopje', 'Karposh', 'Valley Heights 33'),
|
---|
99 | ('Skopje', 'Karposh', 'River Bend 41'),
|
---|
100 | ('Skopje', 'Karposh', 'Forest Grove 29'),
|
---|
101 | ('Skopje', 'Karposh', 'Sunset Ridge 36'),
|
---|
102 | ('Skopje', 'Karposh', 'Meadow Haven 45'),
|
---|
103 | ('Skopje', 'Karposh', 'Highland Crest 38'),
|
---|
104 | ('Skopje', 'Karposh', 'Hilltop View 43'),
|
---|
105 | ('Skopje', 'Karposh', 'Lakefront Lane 30'),
|
---|
106 | ('Skopje', 'Karposh', 'Parkview Terrace 55'),
|
---|
107 | ('Skopje', 'Karposh', 'Creek Side 47'),
|
---|
108 | ('Skopje', 'Karposh', 'Greenfield Place 24'),
|
---|
109 | ('Skopje', 'Karposh', 'Ridgecrest Court 35'),
|
---|
110 | ('Skopje', 'Karposh', 'Harbor Side 39'),
|
---|
111 | ('Skopje', 'Karposh', 'Maple Heights 46'),
|
---|
112 | ('Skopje', 'Karposh', 'Pinecrest Lane 52'),
|
---|
113 | ('Skopje', 'Karposh', 'Riverside Court 48'),
|
---|
114 | ('Skopje', 'Karposh', 'Blossom View 53'),
|
---|
115 | ('Skopje', 'Karposh', 'Winding Path 50'),
|
---|
116 | ('Skopje', 'Karposh', 'Sunnyvale Ridge 37')
|
---|
117 | ;
|
---|
118 |
|
---|
119 | INSERT INTO Postojka (p_id, p_ime, m_id)
|
---|
120 | VALUES
|
---|
121 | (1, 'Station 1', 1),
|
---|
122 | (2, 'Station 2', 2),
|
---|
123 | (3, 'Station 3', 3),
|
---|
124 | (4, 'Station 4', 4),
|
---|
125 | (5, 'Station 5', 5),
|
---|
126 | (6, 'Station 6', 6),
|
---|
127 | (7, 'Station 7', 7),
|
---|
128 | (8, 'Station 8', 8),
|
---|
129 | (9, 'Station 9', 9),
|
---|
130 | (10, 'Station 10', 10),
|
---|
131 | (11, 'Station 11', 11),
|
---|
132 | (12, 'Station 12', 12),
|
---|
133 | (13, 'Station 13', 13),
|
---|
134 | (14, 'Station 14', 14),
|
---|
135 | (15, 'Station 15', 15),
|
---|
136 | (16, 'Station 16', 16),
|
---|
137 | (17, 'Station 17', 17),
|
---|
138 | (18, 'Station 18', 18),
|
---|
139 | (19, 'Station 19', 19),
|
---|
140 | (20, 'Station 20', 20),
|
---|
141 | (21, 'Station 21', 21),
|
---|
142 | (22, 'Station 22', 22),
|
---|
143 | (23, 'Station 23', 23),
|
---|
144 | (24, 'Station 24', 24),
|
---|
145 | (25, 'Station 25', 25),
|
---|
146 | (26, 'Station 26', 26),
|
---|
147 | (27, 'Station 27', 27),
|
---|
148 | (28, 'Station 28', 28),
|
---|
149 | (29, 'Station 29', 29),
|
---|
150 | (30, 'Station 30', 30),
|
---|
151 | (31, 'Station 31', 31),
|
---|
152 | (32, 'Station 32', 32),
|
---|
153 | (33, 'Station 33', 33),
|
---|
154 | (34, 'Station 34', 34),
|
---|
155 | (35, 'Station 35', 35),
|
---|
156 | (36, 'Station 36', 36),
|
---|
157 | (37, 'Station 37', 37),
|
---|
158 | (38, 'Station 38', 38),
|
---|
159 | (39, 'Station 39', 39),
|
---|
160 | (40, 'Station 40', 40),
|
---|
161 | (41, 'Station 41', 41),
|
---|
162 | (42, 'Station 42', 42),
|
---|
163 | (43, 'Station 43', 43),
|
---|
164 | (44, 'Station 44', 44),
|
---|
165 | (45, 'Station 45', 45),
|
---|
166 | (46, 'Station 46', 46),
|
---|
167 | (47, 'Station 47', 47),
|
---|
168 | (48, 'Station 48', 48),
|
---|
169 | (49, 'Station 49', 49),
|
---|
170 | (50, 'Station 50', 50),
|
---|
171 | (51, 'Station 51', 51),
|
---|
172 | (52, 'Station 52', 52),
|
---|
173 | (53, 'Station 53', 53),
|
---|
174 | (54, 'Station 54', 54),
|
---|
175 | (55, 'Station 55', 55),
|
---|
176 | (56, 'Station 56', 56),
|
---|
177 | (57, 'Station 57', 57),
|
---|
178 | (58, 'Station 58', 58),
|
---|
179 | (59, 'Station 59', 59),
|
---|
180 | (60, 'Station 60', 60);
|
---|
181 |
|
---|
182 | INSERT INTO PostojkaNaLinija (pnl_reden_broj, li_id, p_id)
|
---|
183 | VALUES
|
---|
184 | (1, 1, 1),
|
---|
185 | (2, 1, 2),
|
---|
186 | (3, 1, 3),
|
---|
187 | (4, 1, 4),
|
---|
188 | (5, 1, 5),
|
---|
189 | (6, 1, 6),
|
---|
190 | (7, 1, 7),
|
---|
191 | (8, 1, 8),
|
---|
192 | (9, 1, 9),
|
---|
193 | (10, 1, 10),
|
---|
194 | (11, 1, 11),
|
---|
195 | (12, 1, 12),
|
---|
196 | (13, 1, 13),
|
---|
197 | (14, 1, 14),
|
---|
198 | (14, 1, 60),
|
---|
199 | (13, 1, 58),
|
---|
200 | (12, 1, 56),
|
---|
201 | (11, 1, 54),
|
---|
202 | (10, 1, 52),
|
---|
203 | (9, 1, 50),
|
---|
204 | (8, 1, 48),
|
---|
205 | (7, 1, 46),
|
---|
206 | (6, 1, 44),
|
---|
207 | (5, 1, 42),
|
---|
208 | (4, 1, 40),
|
---|
209 | (3, 1, 38),
|
---|
210 | (2, 1, 36),
|
---|
211 | (1, 1, 34),
|
---|
212 | (1, 2, 1),
|
---|
213 | (2, 2, 4),
|
---|
214 | (3, 2, 7),
|
---|
215 | (4, 2, 10),
|
---|
216 | (5, 2, 13),
|
---|
217 | (6, 2, 16),
|
---|
218 | (7, 2, 19),
|
---|
219 | (8, 2, 22),
|
---|
220 | (9, 2, 25),
|
---|
221 | (10, 2, 28),
|
---|
222 | (11, 2, 31),
|
---|
223 | (12, 2, 34),
|
---|
224 | (13, 2, 37),
|
---|
225 | (14, 2, 40),
|
---|
226 | (10, 2, 60),
|
---|
227 | (9, 2, 58),
|
---|
228 | (8, 2, 56),
|
---|
229 | (7, 2, 54),
|
---|
230 | (6, 2, 52),
|
---|
231 | (5, 2, 50),
|
---|
232 | (4, 2, 48),
|
---|
233 | (3, 2, 46),
|
---|
234 | (2, 2, 44),
|
---|
235 | (1, 2, 42),
|
---|
236 | (1, 3, 1),
|
---|
237 | (2, 3, 4),
|
---|
238 | (3, 3, 7),
|
---|
239 | (4, 3, 10),
|
---|
240 | (5, 3, 13),
|
---|
241 | (6, 3, 16),
|
---|
242 | (7, 3, 19),
|
---|
243 | (8, 3, 22),
|
---|
244 | (9, 3, 25),
|
---|
245 | (10, 3, 28),
|
---|
246 | (11, 3, 31),
|
---|
247 | (12, 3, 34),
|
---|
248 | (12, 3, 60),
|
---|
249 | (11, 3, 56),
|
---|
250 | (10, 3, 52),
|
---|
251 | (9, 3, 48),
|
---|
252 | (8, 3, 44),
|
---|
253 | (7, 3, 40),
|
---|
254 | (6, 3, 36),
|
---|
255 | (5, 3, 32),
|
---|
256 | (4, 3, 28),
|
---|
257 | (3, 3, 24),
|
---|
258 | (2, 3, 20),
|
---|
259 | (1, 3, 16),
|
---|
260 | (1, 4, 1),
|
---|
261 | (2, 4, 5),
|
---|
262 | (3, 4, 9),
|
---|
263 | (4, 4, 13),
|
---|
264 | (5, 4, 17),
|
---|
265 | (6, 4, 21),
|
---|
266 | (7, 4, 25),
|
---|
267 | (8, 4, 29),
|
---|
268 | (9, 4, 33),
|
---|
269 | (10, 4, 37),
|
---|
270 | (11, 4, 41),
|
---|
271 | (12, 4, 45),
|
---|
272 | (13, 4, 60),
|
---|
273 | (12, 4, 59),
|
---|
274 | (11, 4, 58),
|
---|
275 | (10, 4, 57),
|
---|
276 | (9, 4, 56),
|
---|
277 | (8, 4, 55),
|
---|
278 | (7, 4, 54),
|
---|
279 | (6, 4, 53),
|
---|
280 | (5, 4, 52),
|
---|
281 | (4, 4, 51),
|
---|
282 | (3, 4, 50),
|
---|
283 | (2, 4, 49),
|
---|
284 | (1, 4, 48),
|
---|
285 | (1, 5, 1),
|
---|
286 | (2, 5, 3),
|
---|
287 | (3, 5, 5),
|
---|
288 | (4, 5, 7),
|
---|
289 | (5, 5, 9),
|
---|
290 | (6, 5, 11),
|
---|
291 | (7, 5, 13),
|
---|
292 | (8, 5, 15),
|
---|
293 | (9, 5, 17),
|
---|
294 | (10, 5, 19),
|
---|
295 | (14, 5, 60),
|
---|
296 | (13, 5, 57),
|
---|
297 | (12, 5, 54),
|
---|
298 | (11, 5, 51),
|
---|
299 | (10, 5, 48),
|
---|
300 | (9, 5, 45),
|
---|
301 | (8, 5, 42),
|
---|
302 | (7, 5, 39),
|
---|
303 | (6, 5, 36),
|
---|
304 | (5, 5, 33),
|
---|
305 | (4, 5, 30),
|
---|
306 | (3, 5, 27),
|
---|
307 | (2, 5, 24),
|
---|
308 | (1, 5, 21);
|
---|
309 |
|
---|
310 |
|
---|
311 |
|
---|
312 |
|
---|
313 |
|
---|
314 | INSERT INTO KategorijaNaBilet (tb_id, tb_trajnost, tb_ime)
|
---|
315 | VALUES
|
---|
316 | (1, 3600, 'Часовен'),
|
---|
317 | (2, 86400, 'Дневен'),
|
---|
318 | (3, 604800, 'Неделен'),
|
---|
319 | (4, 2419200, 'Месечен'),
|
---|
320 | (5, 29030400, 'Годишен');
|
---|
321 |
|
---|
322 | INSERT INTO Bilet (b_datum_na_kupuvanje, patnik_l_id, tb_id)
|
---|
323 | VALUES
|
---|
324 | ('2023-01-01 08:30:00', 1, 1),
|
---|
325 | ('2023-02-01 09:30:00', 1, 2),
|
---|
326 | ('2023-03-01 10:30:00', 1, 3),
|
---|
327 | ('2023-04-01 11:30:00', 1, 4),
|
---|
328 | ('2023-05-01 12:30:00', 1, 5);
|
---|
329 |
|
---|
330 | INSERT INTO Vozenje (vozenje_start, vozenje_end, patnik_l_id, kacuva_pnl_id, dr_id, b_id)
|
---|
331 | VALUES
|
---|
332 | ('2023-01-01 08:00:00', '2023-01-01 10:00:00', 1, 1, 1, 1),
|
---|
333 | ('2023-02-01 09:00:00', '2023-02-01 11:00:00', 1, 30, 2, 2),
|
---|
334 | ('2023-03-01 10:00:00', '2023-03-01 12:00:00', 1, 66, 3, 3),
|
---|
335 | ('2023-04-01 11:00:00', '2023-04-01 13:00:00', 1, 100, 4, 4),
|
---|
336 | ('2023-05-01 12:00:00', '2023-05-01 14:00:00', 1, 122, 5, 5);
|
---|
337 |
|
---|
338 | INSERT INTO Kontroli (kontrola_datum, kondukter_l_id, vozenje_id)
|
---|
339 | VALUES
|
---|
340 | ('2023-01-01 09:00:00', 2, 1),
|
---|
341 | ('2023-02-01 10:00:00', 2, 2),
|
---|
342 | ('2023-03-01 11:00:00', 2, 3),
|
---|
343 | ('2023-04-01 12:00:00', 2, 4),
|
---|
344 | ('2023-05-01 13:00:00', 2, 5);
|
---|
345 |
|
---|
346 | INSERT INTO Kazna (k_iznos, k_plateno, k_datum, kondukter_l_id, kontrola_id, patnik_l_id)
|
---|
347 | VALUES
|
---|
348 | (100.00, false, '2023-01-01', 2, 1, 1),
|
---|
349 | (150.00, false, '2023-02-01', 2, 2, 1);
|
---|
350 |
|
---|
351 | --INSERT INTO Se_validira (vozenje_id, b_id)
|
---|
352 | --VALUES
|
---|
353 | -- (3, 3),
|
---|
354 | -- (4, 4),
|
---|
355 | -- (5, 5);
|
---|
356 |
|
---|
357 | INSERT INTO Se_simnuva_na (pnl_id, vozenje_id)
|
---|
358 | VALUES
|
---|
359 | (8, 1),
|
---|
360 | (35, 2),
|
---|
361 | (70, 3),
|
---|
362 | (102, 4),
|
---|
363 | (125, 5);
|
---|