1 | INSERT INTO admin_table(email, encrypted_password, first_name, surname)
|
---|
2 | VALUES ('admin@gmail.com', 'eYweUU23KK321MM', 'Admin', 'Admin');
|
---|
3 |
|
---|
4 | INSERT INTO driver (email, encrypted_password, first_name, surname,
|
---|
5 | price_per_km, is_approved, admin_id)
|
---|
6 | VALUES ('goce.naumovski@gmail.com', 'eUoafcakfo23OKC', 'Goce', 'Naumovski',
|
---|
7 | 20, true, (SELECT admin_id FROM admin_table WHERE first_name='Admin')),
|
---|
8 | ('stole.petkov@gmail.com', 'ads2EA421da23DD', 'Stole', 'Petkov',
|
---|
9 | 30, true, (SELECT admin_id FROM admin_table WHERE first_name='Admin')),
|
---|
10 | ('filip.filipovski@yahoo.com', 'adw321FAWF23cc', 'Filip', 'Filipovski',
|
---|
11 | 25, true, (SELECT admin_id FROM admin_table WHERE first_name='Admin'));
|
---|
12 |
|
---|
13 |
|
---|
14 | INSERT INTO car(license_plate, model, make, car_year, driver_id)
|
---|
15 | VALUES ('SK-424-NMK', 'Astra', 'Opel', 2012, (SELECT driver_id FROM driver WHERE first_name='Goce')),
|
---|
16 | ('KP-3213-MK', 'A7', 'Audi', 2020, (SELECT driver_id FROM driver WHERE first_name='Stole')),
|
---|
17 | ('PP-6453-NMK', '320d', 'BMW', 2015, (SELECT driver_id FROM driver WHERE first_name='Filip'));
|
---|
18 |
|
---|
19 |
|
---|
20 |
|
---|
21 | INSERT INTO passenger (email, encrypted_password, first_name, surname)
|
---|
22 | VALUES ('marko.markovic@gmail.com', 'eYweUU23KK321MM', 'Marko', 'Markovic'),
|
---|
23 | ('petar.petkov@gmail.com', 'd4kAO421OPAWF2K', 'Petar', 'Petkovski'),
|
---|
24 | ('igor.dzambazov@yahoo.com', 'opa4paKLC213L', 'Igor', 'Dzambazov');
|
---|
25 |
|
---|
26 |
|
---|
27 | INSERT INTO request (city_address, street_address, number_address,
|
---|
28 | latitude, longitude, passenger_id, confirmed_by_driver_id, chosen_driver_id)
|
---|
29 | VALUES ('Skopje', '8-mi Septemvri', 100,
|
---|
30 | 41.99393959013524, 21.417377667964814,
|
---|
31 | (SELECT passenger_id FROM passenger WHERE first_name='Marko'),
|
---|
32 | (SELECT driver_id FROM driver WHERE first_name='Goce'),
|
---|
33 | (SELECT driver_id FROM driver WHERE first_name='Goce')),
|
---|
34 | ('Skopje', 'Sekspirova', 1000,
|
---|
35 | 42.00507009481923, 21.393345075915562,
|
---|
36 | (SELECT passenger_id FROM passenger WHERE first_name='Petar'),
|
---|
37 | (SELECT driver_id FROM driver WHERE first_name='Stole'),
|
---|
38 | (SELECT driver_id FROM driver WHERE first_name='Stole')),
|
---|
39 | ('Skopje', 'Londonska', 2000,
|
---|
40 | 41.99818153071492, 21.39870949368447,
|
---|
41 | (SELECT passenger_id FROM passenger WHERE first_name='Igor'),
|
---|
42 | (SELECT driver_id FROM driver WHERE first_name='Filip'),
|
---|
43 | (SELECT driver_id FROM driver WHERE first_name='Filip'));
|
---|
44 |
|
---|
45 |
|
---|
46 | INSERT INTO drive (driver_id, request_id, car_id, grade, km_travelled, destination_latitude, destination_longitude)
|
---|
47 | VALUES ((SELECT driver_id FROM driver WHERE first_name='Goce'),
|
---|
48 | (SELECT request_id _id FROM request WHERE number_address=100),
|
---|
49 | (SELECT car_id FROM car WHERE make='Opel'), 4.5, 10.1, 41.98658487414903, 21.417779251761253),
|
---|
50 | ((SELECT driver_id FROM driver WHERE first_name='Stole'),
|
---|
51 | (SELECT request_id FROM request WHERE number_address=1000),
|
---|
52 | (SELECT car_id FROM car WHERE make='Audi'), 5.0, 2.2, 41.993953125548614, 21.436189933794598),
|
---|
53 | ((SELECT driver_id FROM driver WHERE first_name='Filip'),
|
---|
54 | (SELECT request_id FROM request WHERE number_address=2000),
|
---|
55 | (SELECT car_id FROM car WHERE make='BMW'), 3.0, 5.4, 41.99806749233745, 21.391557977533605);
|
---|
56 |
|
---|
57 |
|
---|
58 | INSERT INTO payment (total_sum_payed, drive_id, passenger_id)
|
---|
59 | VALUES (20*10.1,
|
---|
60 | (SELECT drive_id FROM drive WHERE (SELECT driver_id FROM driver WHERE first_name='Goce')=driver_id),
|
---|
61 | (SELECT passenger_id FROM passenger WHERE first_name='Marko')),
|
---|
62 | (25*2.2,
|
---|
63 | (SELECT drive_id FROM drive WHERE (SELECT driver_id FROM driver WHERE first_name='Stole')=driver_id),
|
---|
64 | (SELECT passenger_id FROM passenger WHERE first_name='Petar')),
|
---|
65 | (30*5.4,
|
---|
66 | (SELECT drive_id FROM drive WHERE (SELECT driver_id FROM driver WHERE first_name='Filip')=driver_id),
|
---|
67 | (SELECT passenger_id FROM passenger WHERE first_name='Igor')); |
---|