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,926–5,950 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 5926 | 5990 | 4 | 2018-07-17 09:56:55 | 1 | Other |
| 5927 | 5988 | 4 | 2018-07-17 09:57:03 | 1 | Other |
| 5928 | 6004 | 4 | 2018-07-17 09:57:03 | 1 | Other |
| 5929 | 5985 | 4 | 2018-07-17 09:57:20 | 1 | Other |
| 5930 | 6007 | 4 | 2018-07-17 09:57:24 | 1 | Other |
| 5931 | 6008 | 4 | 2018-07-17 09:57:31 | 1 | Other |
| 5932 | 5995 | 4 | 2018-07-17 09:57:45 | 1 | Other |
| 5933 | 6012 | 4 | 2018-07-17 09:57:59 | 1 | Other |
| 5934 | 6000 | 4 | 2018-07-17 09:58:35 | 1 | Other |
| 5935 | 5989 | 4 | 2018-07-17 09:58:41 | 1 | Other |
| 5936 | 5992 | 4 | 2018-07-17 09:59:23 | 1 | Other |
| 5937 | 6005 | 4 | 2018-07-17 09:59:25 | 1 | Other |
| 5938 | 5994 | 4 | 2018-07-17 09:59:51 | 1 | Other |
| 5939 | 6010 | 4 | 2018-07-17 10:00:15 | 1 | Other |
| 5940 | 6002 | 4 | 2018-07-17 10:00:19 | 1 | Other |
| 5941 | 5998 | 4 | 2018-07-17 10:00:47 | 1 | Other |
| 5942 | 5996 | 4 | 2018-07-17 10:00:55 | 1 | Other |
| 5943 | 5997 | 4 | 2018-07-17 10:01:10 | 1 | Other |
| 5944 | 6003 | 4 | 2018-07-17 10:02:40 | 1 | Other |
| 5945 | 6011 | 4 | 2018-07-17 10:02:58 | 1 | Other |
| 5946 | 6240 | 2 | 2018-07-17 13:09:44 | 1 | Metro |
| 5947 | 6238 | 2 | 2018-07-17 13:09:47 | 1 | Metro |
| 5948 | 6239 | 2 | 2018-07-17 13:09:48 | 1 | Metro |
| 5949 | 6237 | 2 | 2018-07-17 13:10:23 | 1 | Metro |
| 5950 | 6215 | 2 | 2018-07-17 14:01:22 | 1 | Private Vehicle |
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;