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,701–5,725 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 5701 | 5800 | 3 | 2018-06-07 11:53:59 | 1 | Train |
| 5702 | 5799 | 3 | 2018-06-07 11:54:27 | 1 | Train |
| 5703 | 5956 | 3 | 2018-06-07 13:15:22 | 1 | Walk |
| 5704 | 5946 | 2 | 2018-06-09 13:35:13 | 1 | Metro |
| 5705 | 5949 | 2 | 2018-06-09 13:35:22 | 1 | Metro |
| 5706 | 5948 | 2 | 2018-06-09 13:35:23 | 1 | Metro |
| 5707 | 5947 | 2 | 2018-06-09 13:35:25 | 1 | Metro |
| 5708 | 5952 | 1 | 2018-06-10 10:04:47 | 1 | Taxi |
| 5709 | 5951 | 1 | 2018-06-10 10:05:12 | 1 | Taxi |
| 5710 | 5953 | 1 | 2018-06-10 10:05:33 | 1 | Taxi |
| 5711 | 6015 | 2 | 2018-06-10 10:41:39 | 1 | Private Vehicle |
| 5712 | 6017 | 2 | 2018-06-10 10:58:01 | 1 | Metro |
| 5713 | 6016 | 2 | 2018-06-10 10:58:28 | 1 | Metro |
| 5714 | 6021 | 1 | 2018-06-10 12:34:40 | 1 | Train |
| 5715 | 6022 | 3 | 2018-06-11 16:23:15 | 1 | Other |
| 5716 | 6028 | 2 | 2018-06-12 15:02:47 | 1 | Bus |
| 5717 | 6029 | 5 | 2018-06-12 15:12:52 | 1 | Walk |
| 5718 | 6031 | 5 | 2018-06-12 15:12:56 | 1 | Walk |
| 5719 | 6030 | 5 | 2018-06-12 15:13:11 | 1 | Walk |
| 5720 | 5950 | 1 | 2018-06-13 10:47:17 | 1 | Train |
| 5721 | 6025 | 2 | 2018-06-13 11:01:40 | 1 | Bus |
| 5722 | 6042 | 1 | 2018-06-13 12:44:04 | 1 | Bus |
| 5723 | 6041 | 4 | 2018-06-13 14:56:31 | 1 | Taxi |
| 5724 | 6038 | 4 | 2018-06-13 14:56:36 | 1 | Taxi |
| 5725 | 6040 | 4 | 2018-06-13 14:56:53 | 1 | Taxi |
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;