Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 5,876–5,900 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 5876 | 6193 | 1 | 2018-07-14 13:04:09 | 0 | NULL |
| 5877 | 6225 | 2 | 2018-07-15 11:15:23 | 1 | Taxi |
| 5878 | 6223 | 1 | 2018-07-15 11:59:25 | 1 | Walk |
| 5879 | 6227 | 1 | 2018-07-15 12:05:27 | 1 | Taxi |
| 5880 | 6226 | 1 | 2018-07-15 12:05:57 | 1 | Taxi |
| 5881 | 6225 | 5 | 2018-07-15 14:09:53 | 0 | NULL |
| 5882 | 6228 | 2 | 2018-07-15 14:11:29 | 1 | Private Vehicle |
| 5883 | 6230 | 2 | 2018-07-15 14:12:02 | 1 | Private Vehicle |
| 5884 | 6229 | 2 | 2018-07-15 14:12:05 | 1 | Private Vehicle |
| 5885 | 6185 | 1 | 2018-07-16 10:36:32 | 1 | Metro |
| 5886 | 6183 | 1 | 2018-07-16 10:36:35 | 1 | Metro |
| 5887 | 6184 | 1 | 2018-07-16 10:36:36 | 1 | Metro |
| 5888 | 6241 | 4 | 2018-07-17 09:13:22 | 1 | Other |
| 5889 | 6243 | 4 | 2018-07-17 09:13:41 | 1 | Other |
| 5890 | 6242 | 4 | 2018-07-17 09:14:01 | 1 | Other |
| 5891 | 5960 | 4 | 2018-07-17 09:51:55 | 1 | Other |
| 5892 | 5961 | 4 | 2018-07-17 09:52:03 | 1 | Other |
| 5893 | 5964 | 4 | 2018-07-17 09:52:15 | 1 | Other |
| 5894 | 5963 | 4 | 2018-07-17 09:52:19 | 1 | Other |
| 5895 | 5962 | 4 | 2018-07-17 09:52:21 | 1 | Other |
| 5896 | 5966 | 4 | 2018-07-17 09:52:37 | 1 | Other |
| 5897 | 5965 | 4 | 2018-07-17 09:52:50 | 1 | Other |
| 5898 | 5972 | 4 | 2018-07-17 09:52:55 | 1 | Other |
| 5899 | 5973 | 4 | 2018-07-17 09:53:13 | 1 | Other |
| 5900 | 5970 | 4 | 2018-07-17 09:53:15 | 1 | Other |
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;