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,101–8,125 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 8101 | 8017 | 1 | 2019-05-31 11:58:59 | 1 | Bus |
| 8102 | 8026 | 1 | 2019-05-31 11:59:00 | 1 | Bus |
| 8103 | 8021 | 1 | 2019-05-31 11:59:27 | 1 | Bus |
| 8104 | 8019 | 1 | 2019-05-31 11:59:47 | 1 | Bus |
| 8105 | 8034 | 1 | 2019-05-31 12:00:12 | 1 | Bus |
| 8106 | 8023 | 1 | 2019-05-31 12:00:43 | 1 | Bus |
| 8107 | 8022 | 1 | 2019-05-31 12:00:54 | 1 | Bus |
| 8108 | 8029 | 1 | 2019-05-31 12:01:03 | 1 | Bus |
| 8109 | 8030 | 1 | 2019-05-31 12:01:15 | 1 | Bus |
| 8110 | 8033 | 1 | 2019-05-31 12:01:15 | 1 | Bus |
| 8111 | 8028 | 1 | 2019-05-31 12:01:22 | 1 | Bus |
| 8112 | 8031 | 1 | 2019-05-31 12:02:01 | 1 | Bus |
| 8113 | 8032 | 1 | 2019-05-31 12:02:49 | 1 | Bus |
| 8114 | 8266 | 1 | 2019-05-31 12:07:25 | 1 | Walk |
| 8115 | 8279 | 1 | 2019-05-31 12:52:30 | 1 | Walk |
| 8116 | 8278 | 1 | 2019-05-31 12:52:31 | 1 | Walk |
| 8117 | 8212 | 4 | 2019-05-31 12:54:34 | 1 | Walk |
| 8118 | 8211 | 4 | 2019-05-31 12:54:59 | 1 | Walk |
| 8119 | 8299 | 2 | 2019-05-31 13:39:31 | 1 | Metro |
| 8120 | 8194 | 1 | 2019-06-01 10:42:22 | 1 | Metro |
| 8121 | 8195 | 1 | 2019-06-01 10:42:42 | 1 | Metro |
| 8122 | 8193 | 1 | 2019-06-01 10:42:44 | 1 | Metro |
| 8123 | 8305 | 2 | 2019-06-02 10:11:05 | 1 | Private Vehicle |
| 8124 | 8304 | 2 | 2019-06-02 10:11:09 | 1 | Private Vehicle |
| 8125 | 8198 | 1 | 2019-06-02 11:18:26 | 1 | Other |
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;