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,826–3,850 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 3826 | 3947 | 2 | 2017-06-05 10:26:16 | 1 | Private Vehicle |
| 3827 | 3943 | 2 | 2017-06-05 10:26:18 | 1 | Private Vehicle |
| 3828 | 3945 | 2 | 2017-06-05 10:26:40 | 1 | Private Vehicle |
| 3829 | 3946 | 2 | 2017-06-05 10:26:43 | 1 | Private Vehicle |
| 3830 | 3944 | 2 | 2017-06-05 10:26:50 | 1 | Private Vehicle |
| 3831 | 3992 | 1 | 2017-06-05 10:50:08 | 1 | Metro |
| 3832 | 3993 | 1 | 2017-06-05 10:50:12 | 1 | Metro |
| 3833 | 3776 | 1 | 2017-06-06 09:06:03 | 1 | Metro |
| 3834 | 3999 | 1 | 2017-06-06 09:08:39 | 1 | Metro |
| 3835 | 4000 | 1 | 2017-06-06 10:15:38 | 1 | Metro |
| 3836 | 4001 | 1 | 2017-06-06 10:16:03 | 1 | Metro |
| 3837 | 4002 | 1 | 2017-06-06 10:58:14 | 1 | Walk |
| 3838 | 4003 | 1 | 2017-06-06 12:01:21 | 1 | Walk |
| 3839 | 3984 | 1 | 2017-06-06 12:48:38 | 1 | Metro |
| 3840 | 3983 | 1 | 2017-06-06 12:48:52 | 1 | Metro |
| 3841 | 3985 | 3 | 2017-06-06 12:58:43 | 1 | Walk |
| 3842 | 3983 | 1 | 2017-06-06 15:32:57 | 0 | NULL |
| 3843 | 3984 | 1 | 2017-06-06 15:54:30 | 0 | NULL |
| 3844 | 4005 | 3 | 2017-06-07 09:26:36 | 1 | Metro |
| 3845 | 4006 | 3 | 2017-06-07 09:26:46 | 1 | Metro |
| 3846 | 4010 | 1 | 2017-06-08 11:57:20 | 1 | Other |
| 3847 | 4009 | 1 | 2017-06-08 11:57:26 | 1 | Other |
| 3848 | 4013 | 2 | 2017-06-08 12:59:47 | 1 | Walk |
| 3849 | 4012 | 2 | 2017-06-08 12:59:51 | 1 | Walk |
| 3850 | 4015 | 2 | 2017-06-08 13:00:05 | 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;