Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 4,926–4,950 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 4926 | 5056 | 2 | 2018-01-07 13:18:51 | 1 | Train |
| 4927 | 5053 | 2 | 2018-01-07 13:19:08 | 1 | Train |
| 4928 | 5055 | 2 | 2018-01-07 13:19:10 | 1 | Train |
| 4929 | 5040 | 1 | 2018-01-07 15:07:30 | 1 | Walk |
| 4930 | 5041 | 1 | 2018-01-07 15:07:36 | 1 | Walk |
| 4931 | 5050 | 1 | 2018-01-08 09:26:17 | 1 | Private Vehicle |
| 4932 | 5049 | 1 | 2018-01-08 09:26:19 | 1 | Private Vehicle |
| 4933 | 5051 | 1 | 2018-01-08 09:26:27 | 1 | Private Vehicle |
| 4934 | 5048 | 1 | 2018-01-08 09:26:28 | 1 | Private Vehicle |
| 4935 | 5047 | 1 | 2018-01-08 09:26:35 | 1 | Private Vehicle |
| 4936 | 5035 | 5 | 2018-01-08 13:40:10 | 1 | Train |
| 4937 | 5036 | 5 | 2018-01-08 13:40:33 | 1 | Train |
| 4938 | 5124 | 2 | 2018-01-09 11:42:08 | 1 | Metro |
| 4939 | 5125 | 2 | 2018-01-09 11:42:12 | 1 | Metro |
| 4940 | 5126 | 3 | 2018-01-10 10:08:24 | 1 | Other |
| 4941 | 5130 | 4 | 2018-01-11 10:20:36 | 1 | Walk |
| 4942 | 5131 | 4 | 2018-01-11 10:20:59 | 1 | Walk |
| 4943 | 5129 | 1 | 2018-01-11 11:47:19 | 1 | Other |
| 4944 | 5139 | 1 | 2018-01-12 09:35:48 | 1 | Taxi |
| 4945 | 5138 | 1 | 2018-01-12 09:36:07 | 1 | Taxi |
| 4946 | 5060 | 1 | 2018-01-12 10:16:28 | 1 | Walk |
| 4947 | 5140 | 2 | 2018-01-12 14:45:58 | 1 | Metro |
| 4948 | 5141 | 2 | 2018-01-12 14:45:59 | 1 | Metro |
| 4949 | 5052 | 1 | 2018-01-13 10:11:35 | 1 | Metro |
| 4950 | 5065 | 5 | 2018-01-13 13:31:07 | 1 | Walk |
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;