Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 8,601–8,625 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 8601 | 8769 | 1 | 2019-08-15 13:16:44 | 1 | Taxi |
| 8602 | 8755 | 4 | 2019-08-15 14:17:22 | 1 | Walk |
| 8603 | 8754 | 4 | 2019-08-15 14:17:25 | 1 | Walk |
| 8604 | 8756 | 4 | 2019-08-15 14:17:54 | 1 | Walk |
| 8605 | 8701 | 1 | 2019-08-16 11:25:29 | 1 | Metro |
| 8606 | 8699 | 1 | 2019-08-16 11:25:49 | 1 | Metro |
| 8607 | 8700 | 1 | 2019-08-16 11:26:05 | 1 | Metro |
| 8608 | 8698 | 1 | 2019-08-16 11:26:14 | 1 | Metro |
| 8609 | 8690 | 3 | 2019-08-16 14:18:22 | 1 | Bus |
| 8610 | 8687 | 3 | 2019-08-16 14:18:32 | 1 | Bus |
| 8611 | 8688 | 3 | 2019-08-16 14:18:34 | 1 | Bus |
| 8612 | 8689 | 3 | 2019-08-16 14:18:34 | 1 | Bus |
| 8613 | 8731 | 1 | 2019-08-17 09:41:51 | 1 | Walk |
| 8614 | 8732 | 1 | 2019-08-17 09:42:28 | 1 | Walk |
| 8615 | 8771 | 1 | 2019-08-18 10:36:12 | 1 | Private Vehicle |
| 8616 | 8770 | 1 | 2019-08-18 10:36:25 | 1 | Private Vehicle |
| 8617 | 8772 | 1 | 2019-08-18 10:36:26 | 1 | Private Vehicle |
| 8618 | 8773 | 1 | 2019-08-18 10:36:55 | 1 | Private Vehicle |
| 8619 | 8780 | 2 | 2019-08-18 11:24:49 | 1 | Bus |
| 8620 | 8779 | 1 | 2019-08-18 14:02:32 | 1 | Private Vehicle |
| 8621 | 8783 | 2 | 2019-08-19 10:43:59 | 1 | Other |
| 8622 | 8785 | 2 | 2019-08-19 13:07:00 | 1 | Metro |
| 8623 | 8784 | 2 | 2019-08-19 13:07:23 | 1 | Metro |
| 8624 | 8574 | 2 | 2019-08-21 09:33:44 | 1 | Metro |
| 8625 | 8575 | 2 | 2019-08-21 09:33:54 | 1 | Metro |
Table definition
CREATE TABLE entry_scan (
scan_id INTEGER PRIMARY KEY,
ticket_id INTEGER NOT NULL REFERENCES ticket (ticket_id),
entrance_id INTEGER NOT NULL REFERENCES entrance (entrance_id),
scanned_at TEXT NOT NULL,
is_first_entry INTEGER NOT NULL CHECK (is_first_entry IN (0, 1)),
transport_mode TEXT CHECK (transport_mode IN ('Walk', 'Metro', 'Train', 'Bus', 'Taxi', 'Private Vehicle', 'Other')),
CHECK ((is_first_entry = 1) = (transport_mode IS NOT NULL))
) STRICT;