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,026–2,050 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 2026 | 2245 | 2 | 2016-05-11 10:23:35 | 1 | Metro |
| 2027 | 2246 | 1 | 2016-05-11 11:38:29 | 1 | Other |
| 2028 | 2247 | 1 | 2016-05-11 11:38:47 | 1 | Other |
| 2029 | 2083 | 2 | 2016-05-12 14:35:35 | 1 | Other |
| 2030 | 2244 | 3 | 2016-05-12 14:42:32 | 1 | Private Vehicle |
| 2031 | 2241 | 3 | 2016-05-12 14:42:41 | 1 | Private Vehicle |
| 2032 | 2242 | 3 | 2016-05-12 14:42:48 | 1 | Private Vehicle |
| 2033 | 2243 | 3 | 2016-05-12 14:42:57 | 1 | Private Vehicle |
| 2034 | 2248 | 2 | 2016-05-12 15:37:18 | 1 | Metro |
| 2035 | 2250 | 3 | 2016-05-13 10:40:32 | 1 | Other |
| 2036 | 2249 | 3 | 2016-05-13 10:40:34 | 1 | Other |
| 2037 | 2252 | 4 | 2016-05-13 12:36:00 | 1 | Bus |
| 2038 | 2251 | 4 | 2016-05-13 12:36:34 | 1 | Bus |
| 2039 | 2256 | 2 | 2016-05-14 12:10:57 | 1 | Walk |
| 2040 | 2257 | 4 | 2016-05-14 12:51:24 | 1 | Bus |
| 2041 | 2130 | 1 | 2016-05-14 14:17:37 | 1 | Walk |
| 2042 | 2129 | 1 | 2016-05-14 14:18:00 | 1 | Walk |
| 2043 | 2128 | 1 | 2016-05-14 14:18:03 | 1 | Walk |
| 2044 | 2255 | 1 | 2016-05-16 11:25:09 | 1 | Other |
| 2045 | 2268 | 1 | 2016-05-16 11:33:08 | 1 | Metro |
| 2046 | 2267 | 1 | 2016-05-16 11:33:10 | 1 | Metro |
| 2047 | 2253 | 5 | 2016-05-16 12:01:47 | 1 | Other |
| 2048 | 2095 | 2 | 2016-05-17 13:21:29 | 1 | Walk |
| 2049 | 2094 | 2 | 2016-05-17 13:21:36 | 1 | Walk |
| 2050 | 2093 | 2 | 2016-05-17 13:22:14 | 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;