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,651–6,675 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 6651 | 6884 | 4 | 2018-10-19 15:18:19 | 1 | Walk |
| 6652 | 6839 | 5 | 2018-10-20 09:39:55 | 1 | Bus |
| 6653 | 6745 | 4 | 2018-10-20 12:18:39 | 1 | Walk |
| 6654 | 6744 | 4 | 2018-10-20 12:19:00 | 1 | Walk |
| 6655 | 6838 | 3 | 2018-10-21 12:47:46 | 1 | Train |
| 6656 | 6836 | 3 | 2018-10-21 12:47:57 | 1 | Train |
| 6657 | 6837 | 3 | 2018-10-21 12:48:15 | 1 | Train |
| 6658 | 6900 | 1 | 2018-10-21 15:08:13 | 1 | Private Vehicle |
| 6659 | 6899 | 3 | 2018-10-22 15:55:01 | 1 | Bus |
| 6660 | 6894 | 1 | 2018-10-23 12:23:10 | 1 | Metro |
| 6661 | 6895 | 1 | 2018-10-23 12:23:30 | 1 | Metro |
| 6662 | 6120 | 4 | 2018-10-25 09:58:37 | 1 | Bus |
| 6663 | 6121 | 4 | 2018-10-25 09:58:51 | 1 | Bus |
| 6664 | 6122 | 4 | 2018-10-25 09:58:51 | 1 | Bus |
| 6665 | 6123 | 4 | 2018-10-25 09:59:01 | 1 | Bus |
| 6666 | 6127 | 4 | 2018-10-25 09:59:05 | 1 | Bus |
| 6667 | 6124 | 4 | 2018-10-25 09:59:13 | 1 | Bus |
| 6668 | 6125 | 4 | 2018-10-25 09:59:47 | 1 | Bus |
| 6669 | 6128 | 4 | 2018-10-25 09:59:49 | 1 | Bus |
| 6670 | 6126 | 4 | 2018-10-25 09:59:55 | 1 | Bus |
| 6671 | 6136 | 4 | 2018-10-25 09:59:57 | 1 | Bus |
| 6672 | 6129 | 4 | 2018-10-25 10:00:07 | 1 | Bus |
| 6673 | 6144 | 4 | 2018-10-25 10:00:13 | 1 | Bus |
| 6674 | 6131 | 4 | 2018-10-25 10:00:16 | 1 | Bus |
| 6675 | 6130 | 4 | 2018-10-25 10:00:17 | 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;