query_DB_Project
query_DB_Project
--5.Sales & Marketing: use customer & custoimerHistory table for analysis
--Data Insertion:
-- Insert Stations
INSERT INTO Station VALUES
(1, 'Est'), (2, 'Meadow Park'), (3, 'Central Terminal'), (4, 'Downtown Square'),
(5, 'Lake View'), (6, 'River Reach'), (7, 'West Bridge');
-- Insert Routes
INSERT INTO Route VALUES
(1, 'Main', 1, 5), (2, 'Main', 5, 1), (3, 'River', 1, 7), (4, 'River', 7, 1);
-- Insert Stops
INSERT INTO Stop VALUES
(1, 1, 1), (2, 1, 2), (3, 1, 3);
-- Insert Buses
INSERT INTO Bus VALUES
(350001, 'Mitsubishi', 'Aero Ace', 2019),
(350002, 'Mitsubishi', 'Aero Star', 2021);
-- Insert Drivers
INSERT INTO Driver VALUES
(350001, 'Teddy Park'), (350002, 'Sophia Nguyen');
-- Insert Timetable
INSERT INTO Timetable VALUES
(1, 1, 350001, 350001, TO_TIMESTAMP('2024-01-01 08:00:00', 'YYYY-MM-DD
HH24:MI:SS'), NULL, NULL, NULL, NULL, NULL, NULL);
-- Insert Customers
INSERT INTO Customer VALUES
(1, 'Yuna Ukawa'), (2, 'Liam Rodriguez');
-- Insert Salaries
INSERT INTO DriverSalary VALUES
(2024, 'Jan', 350001, 25.00, 160, 4000.00);