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,551–6,575 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 6551 | 6753 | 1 | 2018-10-04 09:52:27 | 1 | Metro |
| 6552 | 6518 | 4 | 2018-10-05 11:42:18 | 1 | Bus |
| 6553 | 6521 | 4 | 2018-10-05 11:42:30 | 1 | Bus |
| 6554 | 6519 | 4 | 2018-10-05 11:42:31 | 1 | Bus |
| 6555 | 6520 | 4 | 2018-10-05 11:42:36 | 1 | Bus |
| 6556 | 6522 | 4 | 2018-10-05 11:42:46 | 1 | Bus |
| 6557 | 6525 | 4 | 2018-10-05 11:42:54 | 1 | Bus |
| 6558 | 6524 | 4 | 2018-10-05 11:43:08 | 1 | Bus |
| 6559 | 6533 | 4 | 2018-10-05 11:43:28 | 1 | Bus |
| 6560 | 6527 | 4 | 2018-10-05 11:43:30 | 1 | Bus |
| 6561 | 6535 | 4 | 2018-10-05 11:43:38 | 1 | Bus |
| 6562 | 6531 | 4 | 2018-10-05 11:43:42 | 1 | Bus |
| 6563 | 6532 | 4 | 2018-10-05 11:43:49 | 1 | Bus |
| 6564 | 6526 | 4 | 2018-10-05 11:43:56 | 1 | Bus |
| 6565 | 6541 | 4 | 2018-10-05 11:43:58 | 1 | Bus |
| 6566 | 6546 | 4 | 2018-10-05 11:43:58 | 1 | Bus |
| 6567 | 6536 | 4 | 2018-10-05 11:44:00 | 1 | Bus |
| 6568 | 6543 | 4 | 2018-10-05 11:44:08 | 1 | Bus |
| 6569 | 6528 | 4 | 2018-10-05 11:44:15 | 1 | Bus |
| 6570 | 6529 | 4 | 2018-10-05 11:44:18 | 1 | Bus |
| 6571 | 6551 | 4 | 2018-10-05 11:44:18 | 1 | Bus |
| 6572 | 6530 | 4 | 2018-10-05 11:44:19 | 1 | Bus |
| 6573 | 6548 | 4 | 2018-10-05 11:44:33 | 1 | Bus |
| 6574 | 6552 | 4 | 2018-10-05 11:44:53 | 1 | Bus |
| 6575 | 6545 | 4 | 2018-10-05 11:45:06 | 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;