Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 3,701–3,725 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 3701 | 3461 | 4 | 2017-05-03 12:04:01 | 1 | Bus |
| 3702 | 3470 | 4 | 2017-05-03 12:04:05 | 1 | Bus |
| 3703 | 3465 | 4 | 2017-05-03 12:04:06 | 1 | Bus |
| 3704 | 3462 | 4 | 2017-05-03 12:04:13 | 1 | Bus |
| 3705 | 3460 | 4 | 2017-05-03 12:04:16 | 1 | Bus |
| 3706 | 3466 | 4 | 2017-05-03 12:04:17 | 1 | Bus |
| 3707 | 3464 | 4 | 2017-05-03 12:05:55 | 1 | Bus |
| 3708 | 3885 | 2 | 2017-05-04 11:27:45 | 1 | Taxi |
| 3709 | 3842 | 2 | 2017-05-04 14:23:46 | 1 | Private Vehicle |
| 3710 | 3854 | 1 | 2017-05-04 15:37:31 | 1 | Metro |
| 3711 | 3886 | 5 | 2017-05-05 11:09:41 | 1 | Bus |
| 3712 | 3874 | 2 | 2017-05-05 11:14:38 | 1 | Bus |
| 3713 | 3873 | 2 | 2017-05-05 11:14:45 | 1 | Bus |
| 3714 | 3875 | 2 | 2017-05-05 11:15:00 | 1 | Bus |
| 3715 | 3876 | 2 | 2017-05-05 11:15:02 | 1 | Bus |
| 3716 | 3883 | 4 | 2017-05-06 09:30:59 | 1 | Bus |
| 3717 | 3880 | 4 | 2017-05-06 09:31:14 | 1 | Bus |
| 3718 | 3882 | 4 | 2017-05-06 09:31:14 | 1 | Bus |
| 3719 | 3884 | 4 | 2017-05-06 09:31:15 | 1 | Bus |
| 3720 | 3881 | 4 | 2017-05-06 09:31:28 | 1 | Bus |
| 3721 | 3851 | 1 | 2017-05-06 10:00:39 | 1 | Walk |
| 3722 | 3872 | 2 | 2017-05-06 15:06:19 | 1 | Private Vehicle |
| 3723 | 3891 | 2 | 2017-05-06 15:07:19 | 1 | Metro |
| 3724 | 3857 | 2 | 2017-05-07 11:59:35 | 1 | Metro |
| 3725 | 3858 | 2 | 2017-05-07 11:59:35 | 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;