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,076–2,100 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 2076 | 2289 | 2 | 2016-05-25 10:27:33 | 1 | Private Vehicle |
| 2077 | 2142 | 2 | 2016-05-25 12:43:48 | 0 | NULL |
| 2078 | 2141 | 5 | 2016-05-25 13:14:48 | 0 | NULL |
| 2079 | 2140 | 1 | 2016-05-25 14:23:42 | 0 | NULL |
| 2080 | 2292 | 4 | 2016-05-26 11:31:49 | 1 | Walk |
| 2081 | 2294 | 2 | 2016-05-26 14:13:38 | 1 | Metro |
| 2082 | 2293 | 2 | 2016-05-26 14:13:58 | 1 | Metro |
| 2083 | 2201 | 4 | 2016-05-26 15:16:27 | 1 | Metro |
| 2084 | 2200 | 4 | 2016-05-26 15:16:35 | 1 | Metro |
| 2085 | 2283 | 1 | 2016-05-27 12:23:07 | 1 | Metro |
| 2086 | 2284 | 1 | 2016-05-27 12:23:11 | 1 | Metro |
| 2087 | 2287 | 1 | 2016-05-27 14:57:37 | 1 | Metro |
| 2088 | 2297 | 1 | 2016-05-28 10:28:54 | 1 | Walk |
| 2089 | 2296 | 1 | 2016-05-28 10:28:55 | 1 | Walk |
| 2090 | 2254 | 2 | 2016-05-28 10:58:38 | 1 | Walk |
| 2091 | 2298 | 2 | 2016-05-28 15:15:16 | 1 | Private Vehicle |
| 2092 | 2299 | 2 | 2016-05-28 15:15:34 | 1 | Private Vehicle |
| 2093 | 2146 | 4 | 2016-05-29 11:59:21 | 1 | Bus |
| 2094 | 2148 | 4 | 2016-05-29 11:59:25 | 1 | Bus |
| 2095 | 2149 | 4 | 2016-05-29 11:59:31 | 1 | Bus |
| 2096 | 2150 | 4 | 2016-05-29 11:59:51 | 1 | Bus |
| 2097 | 2156 | 4 | 2016-05-29 11:59:53 | 1 | Bus |
| 2098 | 2151 | 4 | 2016-05-29 11:59:57 | 1 | Bus |
| 2099 | 2153 | 4 | 2016-05-29 12:00:03 | 1 | Bus |
| 2100 | 2152 | 4 | 2016-05-29 12:00:21 | 1 | Bus |
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;