Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 7,701–7,725 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 7701 | 7977 | 2 | 2019-04-11 11:55:06 | 1 | Metro |
| 7702 | 7824 | 1 | 2019-04-11 13:18:12 | 1 | Train |
| 7703 | 7821 | 1 | 2019-04-11 13:18:25 | 1 | Train |
| 7704 | 7823 | 1 | 2019-04-11 13:18:47 | 1 | Train |
| 7705 | 7822 | 1 | 2019-04-11 13:18:48 | 1 | Train |
| 7706 | 8037 | 3 | 2019-04-11 13:46:37 | 1 | Metro |
| 7707 | 7985 | 1 | 2019-04-11 16:36:48 | 1 | Metro |
| 7708 | 7983 | 1 | 2019-04-11 16:37:24 | 1 | Metro |
| 7709 | 7984 | 1 | 2019-04-11 16:37:25 | 1 | Metro |
| 7710 | 8048 | 2 | 2019-04-12 10:16:56 | 1 | Train |
| 7711 | 8049 | 2 | 2019-04-12 10:16:58 | 1 | Train |
| 7712 | 8050 | 5 | 2019-04-12 13:24:25 | 1 | Metro |
| 7713 | 7980 | 2 | 2019-04-13 10:18:04 | 1 | Metro |
| 7714 | 7981 | 2 | 2019-04-13 10:18:04 | 1 | Metro |
| 7715 | 7982 | 2 | 2019-04-13 10:18:45 | 1 | Metro |
| 7716 | 8071 | 2 | 2019-04-14 09:50:49 | 1 | Metro |
| 7717 | 8072 | 2 | 2019-04-14 09:51:23 | 1 | Metro |
| 7718 | 7911 | 2 | 2019-04-14 10:28:14 | 1 | Metro |
| 7719 | 7912 | 2 | 2019-04-14 10:28:41 | 1 | Metro |
| 7720 | 8072 | 2 | 2019-04-14 12:15:31 | 0 | NULL |
| 7721 | 8062 | 1 | 2019-04-14 12:31:14 | 1 | Walk |
| 7722 | 8061 | 1 | 2019-04-14 12:31:40 | 1 | Walk |
| 7723 | 8074 | 1 | 2019-04-14 13:42:38 | 1 | Walk |
| 7724 | 8073 | 1 | 2019-04-14 13:42:48 | 1 | Walk |
| 7725 | 8075 | 1 | 2019-04-14 13:42:51 | 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;