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,451–6,475 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 6451 | 6705 | 2 | 2018-09-14 10:56:08 | 1 | Metro |
| 6452 | 6706 | 2 | 2018-09-14 10:56:14 | 1 | Metro |
| 6453 | 6707 | 2 | 2018-09-14 10:56:22 | 1 | Metro |
| 6454 | 6704 | 2 | 2018-09-14 10:56:35 | 1 | Metro |
| 6455 | 6710 | 5 | 2018-09-15 09:36:28 | 1 | Walk |
| 6456 | 6711 | 1 | 2018-09-15 10:52:35 | 1 | Other |
| 6457 | 6712 | 1 | 2018-09-15 10:53:04 | 1 | Other |
| 6458 | 6715 | 4 | 2018-09-16 12:02:11 | 1 | Metro |
| 6459 | 6714 | 4 | 2018-09-16 12:02:31 | 1 | Metro |
| 6460 | 6713 | 4 | 2018-09-16 12:02:47 | 1 | Metro |
| 6461 | 6719 | 1 | 2018-09-16 15:08:28 | 1 | Walk |
| 6462 | 6718 | 1 | 2018-09-16 15:09:11 | 1 | Walk |
| 6463 | 6715 | 4 | 2018-09-16 15:24:06 | 0 | NULL |
| 6464 | 6713 | 1 | 2018-09-16 15:35:23 | 0 | NULL |
| 6465 | 6714 | 4 | 2018-09-16 15:49:43 | 0 | NULL |
| 6466 | 6720 | 1 | 2018-09-17 10:13:51 | 1 | Bus |
| 6467 | 6722 | 2 | 2018-09-17 11:16:57 | 1 | Metro |
| 6468 | 6723 | 2 | 2018-09-17 11:17:10 | 1 | Metro |
| 6469 | 6721 | 2 | 2018-09-17 11:17:16 | 1 | Metro |
| 6470 | 6724 | 2 | 2018-09-17 11:17:30 | 1 | Metro |
| 6471 | 6725 | 2 | 2018-09-17 11:21:15 | 1 | Bus |
| 6472 | 6726 | 2 | 2018-09-17 11:21:27 | 1 | Bus |
| 6473 | 6687 | 1 | 2018-09-18 10:58:42 | 1 | Train |
| 6474 | 6686 | 1 | 2018-09-18 10:59:15 | 1 | Train |
| 6475 | 6709 | 1 | 2018-09-18 11:42:09 | 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;