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,701–6,725 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 6701 | 6155 | 4 | 2018-10-25 10:05:46 | 1 | Bus |
| 6702 | 6161 | 4 | 2018-10-25 10:06:13 | 1 | Bus |
| 6703 | 6157 | 4 | 2018-10-25 10:06:33 | 1 | Bus |
| 6704 | 6163 | 4 | 2018-10-25 10:06:37 | 1 | Bus |
| 6705 | 6698 | 1 | 2018-10-25 14:21:27 | 1 | Walk |
| 6706 | 6697 | 1 | 2018-10-25 14:21:34 | 1 | Walk |
| 6707 | 6699 | 1 | 2018-10-25 14:21:57 | 1 | Walk |
| 6708 | 6915 | 2 | 2018-10-26 09:49:57 | 1 | Other |
| 6709 | 6913 | 2 | 2018-10-26 09:50:02 | 1 | Other |
| 6710 | 6912 | 2 | 2018-10-26 09:50:03 | 1 | Other |
| 6711 | 6914 | 2 | 2018-10-26 09:50:09 | 1 | Other |
| 6712 | 6916 | 4 | 2018-10-26 14:28:26 | 1 | Metro |
| 6713 | 6919 | 1 | 2018-10-26 15:04:03 | 1 | Other |
| 6714 | 6920 | 1 | 2018-10-26 15:04:10 | 1 | Other |
| 6715 | 6917 | 1 | 2018-10-26 15:04:25 | 1 | Other |
| 6716 | 6918 | 1 | 2018-10-26 15:04:25 | 1 | Other |
| 6717 | 6888 | 1 | 2018-10-27 15:11:02 | 1 | Bus |
| 6718 | 6921 | 1 | 2018-10-27 15:35:36 | 1 | Private Vehicle |
| 6719 | 6922 | 1 | 2018-10-27 15:35:38 | 1 | Private Vehicle |
| 6720 | 6926 | 1 | 2018-10-27 16:29:27 | 1 | Private Vehicle |
| 6721 | 6925 | 1 | 2018-10-27 16:29:29 | 1 | Private Vehicle |
| 6722 | 6879 | 1 | 2018-10-28 10:23:56 | 1 | Train |
| 6723 | 6878 | 1 | 2018-10-28 10:24:01 | 1 | Train |
| 6724 | 6930 | 1 | 2018-10-28 12:06:53 | 1 | Bus |
| 6725 | 6928 | 1 | 2018-10-28 12:07:05 | 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;