Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 5,726–5,750 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 5726 | 6037 | 4 | 2018-06-13 14:56:54 | 1 | Taxi |
| 5727 | 6039 | 4 | 2018-06-13 14:57:05 | 1 | Taxi |
| 5728 | 6043 | 1 | 2018-06-13 15:36:18 | 1 | Walk |
| 5729 | 6044 | 1 | 2018-06-13 15:36:20 | 1 | Walk |
| 5730 | 6049 | 5 | 2018-06-15 10:33:09 | 1 | Bus |
| 5731 | 6046 | 2 | 2018-06-15 11:00:15 | 1 | Metro |
| 5732 | 6024 | 5 | 2018-06-15 11:00:50 | 1 | Walk |
| 5733 | 6023 | 5 | 2018-06-15 11:01:01 | 1 | Walk |
| 5734 | 6047 | 1 | 2018-06-15 11:22:55 | 1 | Walk |
| 5735 | 6035 | 2 | 2018-06-15 13:22:53 | 1 | Private Vehicle |
| 5736 | 6033 | 2 | 2018-06-15 13:22:55 | 1 | Private Vehicle |
| 5737 | 6032 | 2 | 2018-06-15 13:23:00 | 1 | Private Vehicle |
| 5738 | 6036 | 2 | 2018-06-15 13:23:23 | 1 | Private Vehicle |
| 5739 | 6034 | 2 | 2018-06-15 13:23:31 | 1 | Private Vehicle |
| 5740 | 6034 | 2 | 2018-06-15 15:53:36 | 0 | NULL |
| 5741 | 6033 | 2 | 2018-06-15 16:59:39 | 0 | NULL |
| 5742 | 6035 | 2 | 2018-06-15 17:13:40 | 0 | NULL |
| 5743 | 6036 | 2 | 2018-06-15 17:15:51 | 0 | NULL |
| 5744 | 6032 | 1 | 2018-06-15 17:17:04 | 0 | NULL |
| 5745 | 5938 | 1 | 2018-06-16 11:29:51 | 1 | Walk |
| 5746 | 5937 | 1 | 2018-06-16 11:29:55 | 1 | Walk |
| 5747 | 6027 | 1 | 2018-06-17 11:24:17 | 1 | Other |
| 5748 | 6026 | 1 | 2018-06-17 11:24:32 | 1 | Other |
| 5749 | 6058 | 2 | 2018-06-17 12:26:44 | 1 | Metro |
| 5750 | 6056 | 2 | 2018-06-17 12:27:02 | 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;