Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 9,376–9,400 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 9376 | 9352 | 3 | 2019-12-18 11:31:09 | 1 | Metro |
| 9377 | 9536 | 1 | 2019-12-18 15:04:18 | 0 | NULL |
| 9378 | 9539 | 4 | 2019-12-19 10:59:13 | 1 | Metro |
| 9379 | 9568 | 5 | 2019-12-19 14:14:40 | 1 | Metro |
| 9380 | 9553 | 4 | 2019-12-20 09:22:25 | 1 | Walk |
| 9381 | 9552 | 4 | 2019-12-20 09:22:35 | 1 | Walk |
| 9382 | 9241 | 4 | 2019-12-20 13:54:08 | 1 | Bus |
| 9383 | 9242 | 4 | 2019-12-20 13:54:14 | 1 | Bus |
| 9384 | 9244 | 4 | 2019-12-20 13:54:26 | 1 | Bus |
| 9385 | 9243 | 4 | 2019-12-20 13:54:36 | 1 | Bus |
| 9386 | 9245 | 4 | 2019-12-20 13:54:40 | 1 | Bus |
| 9387 | 9249 | 4 | 2019-12-20 13:54:48 | 1 | Bus |
| 9388 | 9251 | 4 | 2019-12-20 13:55:08 | 1 | Bus |
| 9389 | 9253 | 4 | 2019-12-20 13:55:08 | 1 | Bus |
| 9390 | 9246 | 4 | 2019-12-20 13:55:18 | 1 | Bus |
| 9391 | 9250 | 4 | 2019-12-20 13:55:20 | 1 | Bus |
| 9392 | 9247 | 4 | 2019-12-20 13:55:32 | 1 | Bus |
| 9393 | 9263 | 4 | 2019-12-20 13:55:36 | 1 | Bus |
| 9394 | 9264 | 4 | 2019-12-20 13:55:40 | 1 | Bus |
| 9395 | 9248 | 4 | 2019-12-20 13:55:46 | 1 | Bus |
| 9396 | 9252 | 4 | 2019-12-20 13:55:47 | 1 | Bus |
| 9397 | 9259 | 4 | 2019-12-20 13:55:56 | 1 | Bus |
| 9398 | 9254 | 4 | 2019-12-20 13:56:05 | 1 | Bus |
| 9399 | 9258 | 4 | 2019-12-20 13:56:07 | 1 | Bus |
| 9400 | 9260 | 4 | 2019-12-20 13:56:40 | 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;