Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 8,526–8,550 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 8526 | 8667 | 2 | 2019-08-04 15:06:55 | 1 | Bus |
| 8527 | 8666 | 2 | 2019-08-04 15:06:56 | 1 | Bus |
| 8528 | 8668 | 2 | 2019-08-04 15:07:30 | 1 | Bus |
| 8529 | 8709 | 2 | 2019-08-05 10:39:42 | 1 | Bus |
| 8530 | 8598 | 1 | 2019-08-05 11:13:21 | 1 | Bus |
| 8531 | 8697 | 2 | 2019-08-05 13:34:06 | 1 | Metro |
| 8532 | 8696 | 2 | 2019-08-05 13:34:08 | 1 | Metro |
| 8533 | 8652 | 1 | 2019-08-06 09:23:47 | 1 | Walk |
| 8534 | 8653 | 1 | 2019-08-06 09:24:11 | 1 | Walk |
| 8535 | 8712 | 1 | 2019-08-06 09:36:42 | 1 | Metro |
| 8536 | 8713 | 1 | 2019-08-06 09:37:00 | 1 | Metro |
| 8537 | 8590 | 5 | 2019-08-06 11:59:47 | 1 | Bus |
| 8538 | 8592 | 5 | 2019-08-06 11:59:58 | 1 | Bus |
| 8539 | 8593 | 5 | 2019-08-06 12:00:00 | 1 | Bus |
| 8540 | 8591 | 5 | 2019-08-06 12:00:12 | 1 | Bus |
| 8541 | 8716 | 2 | 2019-08-06 13:03:15 | 1 | Walk |
| 8542 | 8714 | 2 | 2019-08-06 13:03:34 | 1 | Walk |
| 8543 | 8715 | 2 | 2019-08-06 13:03:54 | 1 | Walk |
| 8544 | 8705 | 1 | 2019-08-06 14:21:05 | 1 | Bus |
| 8545 | 8708 | 1 | 2019-08-06 14:21:11 | 1 | Bus |
| 8546 | 8706 | 1 | 2019-08-06 14:21:12 | 1 | Bus |
| 8547 | 8707 | 1 | 2019-08-06 14:21:21 | 1 | Bus |
| 8548 | 8639 | 3 | 2019-08-06 14:56:22 | 1 | Bus |
| 8549 | 8637 | 3 | 2019-08-06 14:56:23 | 1 | Bus |
| 8550 | 8638 | 3 | 2019-08-06 14:56:47 | 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;