Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 6,526–6,550 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 6526 | 6622 | 2 | 2018-09-27 10:50:10 | 1 | Private Vehicle |
| 6527 | 6621 | 2 | 2018-09-27 10:50:12 | 1 | Private Vehicle |
| 6528 | 6623 | 2 | 2018-09-27 10:50:31 | 1 | Private Vehicle |
| 6529 | 6517 | 1 | 2018-09-28 14:09:22 | 1 | Walk |
| 6530 | 6774 | 5 | 2018-09-28 14:23:37 | 1 | Metro |
| 6531 | 6775 | 5 | 2018-09-28 14:24:02 | 1 | Metro |
| 6532 | 6777 | 1 | 2018-09-29 11:33:59 | 1 | Metro |
| 6533 | 6778 | 1 | 2018-09-29 11:34:19 | 1 | Metro |
| 6534 | 6691 | 1 | 2018-09-29 12:15:44 | 1 | Bus |
| 6535 | 6690 | 1 | 2018-09-29 12:16:02 | 1 | Bus |
| 6536 | 6783 | 3 | 2018-09-30 10:41:12 | 1 | Metro |
| 6537 | 6776 | 4 | 2018-09-30 13:23:37 | 1 | Private Vehicle |
| 6538 | 6355 | 2 | 2018-10-02 09:14:14 | 1 | Private Vehicle |
| 6539 | 6354 | 2 | 2018-10-02 09:14:41 | 1 | Private Vehicle |
| 6540 | 6781 | 2 | 2018-10-02 14:41:54 | 1 | Private Vehicle |
| 6541 | 6782 | 2 | 2018-10-02 14:42:23 | 1 | Private Vehicle |
| 6542 | 6832 | 1 | 2018-10-03 10:16:25 | 1 | Taxi |
| 6543 | 6833 | 1 | 2018-10-03 10:16:27 | 1 | Taxi |
| 6544 | 6835 | 1 | 2018-10-03 11:00:22 | 1 | Walk |
| 6545 | 6834 | 1 | 2018-10-03 11:00:54 | 1 | Walk |
| 6546 | 6784 | 2 | 2018-10-03 15:53:07 | 1 | Private Vehicle |
| 6547 | 6787 | 2 | 2018-10-03 15:53:12 | 1 | Private Vehicle |
| 6548 | 6785 | 2 | 2018-10-03 15:53:27 | 1 | Private Vehicle |
| 6549 | 6786 | 2 | 2018-10-03 15:53:28 | 1 | Private Vehicle |
| 6550 | 6754 | 1 | 2018-10-04 09:52:23 | 1 | Metro |
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;