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,351–8,375 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 8351 | 8547 | 1 | 2019-07-14 10:47:35 | 1 | Bus |
| 8352 | 8548 | 1 | 2019-07-14 10:47:42 | 1 | Bus |
| 8353 | 7932 | 4 | 2019-07-14 10:58:43 | 1 | Bus |
| 8354 | 7933 | 4 | 2019-07-14 10:58:52 | 1 | Bus |
| 8355 | 7935 | 4 | 2019-07-14 10:58:55 | 1 | Bus |
| 8356 | 7934 | 4 | 2019-07-14 10:58:57 | 1 | Bus |
| 8357 | 7936 | 4 | 2019-07-14 10:59:15 | 1 | Bus |
| 8358 | 7937 | 4 | 2019-07-14 10:59:23 | 1 | Bus |
| 8359 | 7938 | 4 | 2019-07-14 10:59:25 | 1 | Bus |
| 8360 | 7941 | 4 | 2019-07-14 10:59:28 | 1 | Bus |
| 8361 | 7943 | 4 | 2019-07-14 10:59:38 | 1 | Bus |
| 8362 | 7945 | 4 | 2019-07-14 10:59:48 | 1 | Bus |
| 8363 | 7949 | 4 | 2019-07-14 10:59:51 | 1 | Bus |
| 8364 | 7942 | 4 | 2019-07-14 11:00:03 | 1 | Bus |
| 8365 | 7939 | 4 | 2019-07-14 11:00:28 | 1 | Bus |
| 8366 | 7944 | 4 | 2019-07-14 11:00:31 | 1 | Bus |
| 8367 | 7940 | 4 | 2019-07-14 11:00:43 | 1 | Bus |
| 8368 | 7966 | 4 | 2019-07-14 11:00:59 | 1 | Bus |
| 8369 | 7967 | 4 | 2019-07-14 11:01:03 | 1 | Bus |
| 8370 | 7950 | 4 | 2019-07-14 11:01:07 | 1 | Bus |
| 8371 | 7957 | 4 | 2019-07-14 11:01:13 | 1 | Bus |
| 8372 | 7954 | 4 | 2019-07-14 11:01:17 | 1 | Bus |
| 8373 | 7958 | 4 | 2019-07-14 11:01:19 | 1 | Bus |
| 8374 | 7959 | 4 | 2019-07-14 11:01:25 | 1 | Bus |
| 8375 | 8517 | 4 | 2019-07-14 11:01:33 | 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;