Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 2,701–2,725 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 2701 | 2783 | 1 | 2016-09-16 09:10:37 | 1 | Metro |
| 2702 | 2785 | 4 | 2016-09-16 11:52:21 | 1 | Metro |
| 2703 | 2809 | 5 | 2016-09-17 10:20:56 | 1 | Walk |
| 2704 | 2810 | 5 | 2016-09-17 10:21:01 | 1 | Walk |
| 2705 | 2691 | 1 | 2016-09-17 16:24:30 | 1 | Train |
| 2706 | 2690 | 1 | 2016-09-17 16:24:45 | 1 | Train |
| 2707 | 2818 | 3 | 2016-09-18 10:29:49 | 1 | Other |
| 2708 | 2821 | 3 | 2016-09-19 12:35:29 | 1 | Private Vehicle |
| 2709 | 2820 | 3 | 2016-09-19 12:35:32 | 1 | Private Vehicle |
| 2710 | 2819 | 3 | 2016-09-19 12:35:34 | 1 | Private Vehicle |
| 2711 | 2825 | 1 | 2016-09-19 16:13:53 | 1 | Metro |
| 2712 | 2823 | 1 | 2016-09-19 16:14:03 | 1 | Metro |
| 2713 | 2824 | 1 | 2016-09-19 16:14:21 | 1 | Metro |
| 2714 | 2822 | 2 | 2016-09-20 09:27:05 | 1 | Taxi |
| 2715 | 2815 | 1 | 2016-09-21 11:03:01 | 1 | Other |
| 2716 | 2814 | 1 | 2016-09-21 11:03:16 | 1 | Other |
| 2717 | 2829 | 1 | 2016-09-21 12:38:47 | 1 | Metro |
| 2718 | 2828 | 1 | 2016-09-21 12:39:07 | 1 | Metro |
| 2719 | 2787 | 1 | 2016-09-21 16:27:24 | 1 | Metro |
| 2720 | 2788 | 1 | 2016-09-21 16:27:58 | 1 | Metro |
| 2721 | 2833 | 1 | 2016-09-22 10:44:59 | 1 | Other |
| 2722 | 2835 | 1 | 2016-09-22 10:45:20 | 1 | Other |
| 2723 | 2834 | 1 | 2016-09-22 10:45:38 | 1 | Other |
| 2724 | 2837 | 4 | 2016-09-22 15:09:14 | 1 | Metro |
| 2725 | 2836 | 4 | 2016-09-22 15:09:17 | 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;