USE speed_monitoring;

INSERT INTO vehicles (plate_no, branch, gps_device_id) VALUES
('DD8425SP','Makassar','GPS-001'),
('B9966SEH','Makassar','GPS-002'),
('DD8579KY','Makassar','GPS-003'),
('DD9404SD','Makassar','GPS-004'),
('DD8641RD','Makassar','GPS-005'),
('B9979SEH','Makassar','GPS-006')
ON DUPLICATE KEY UPDATE branch = VALUES(branch);

INSERT INTO speeding_events (event_time, plate_no, driver_name, speed, speed_limit, duration_seconds, location, severity, status, source_file, raw_alarm) VALUES
('2026-05-02 07:31:00','B9979SEH',NULL,109,60,70,'Sample GPS Location','CRITICAL','OPEN','sample','Speeding 109 limit 60'),
('2026-05-30 08:46:00','DD8579KY',NULL,97,60,120,'Sample GPS Location','CRITICAL','OPEN','sample','Speeding 97 limit 60'),
('2026-05-02 15:26:00','DD9404SD',NULL,91,60,34,'Sample GPS Location','CRITICAL','OPEN','sample','Speeding 91 limit 60'),
('2026-05-11 10:16:00','DD8425SP',NULL,71,40,416,'Sample GPS Location','CRITICAL','OPEN','sample','Speeding 71 limit 40'),
('2026-05-13 14:21:00','B9966SEH',NULL,70,60,185,'Sample GPS Location','HIGH','WARNING','sample','Speeding 70 limit 60'),
('2026-05-16 09:10:00','DD8641RD',NULL,80,60,90,'Sample GPS Location','HIGH','OPEN','sample','Speeding 80 limit 60'),
('2026-05-18 12:00:00','DD8425SP',NULL,46,40,26,'Sample GPS Location','MEDIUM','OPEN','sample','Speeding 46 limit 40'),
('2026-05-20 15:44:00','B9966SEH',NULL,63,60,20,'Sample GPS Location','LOW','CLOSED','sample','Speeding 63 limit 60');
