Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 8,001–8,025 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 8001 | 7559 | 4 | 2019-05-17 10:39:43 | 1 | Bus |
| 8002 | 7564 | 4 | 2019-05-17 10:39:51 | 1 | Bus |
| 8003 | 7551 | 4 | 2019-05-17 10:40:03 | 1 | Bus |
| 8004 | 7561 | 4 | 2019-05-17 10:40:03 | 1 | Bus |
| 8005 | 7572 | 4 | 2019-05-17 10:40:12 | 1 | Bus |
| 8006 | 7567 | 4 | 2019-05-17 10:40:43 | 1 | Bus |
| 8007 | 7568 | 4 | 2019-05-17 10:40:53 | 1 | Bus |
| 8008 | 7569 | 4 | 2019-05-17 10:41:03 | 1 | Bus |
| 8009 | 7573 | 4 | 2019-05-17 10:43:07 | 1 | Bus |
| 8010 | 8215 | 1 | 2019-05-17 12:37:01 | 0 | NULL |
| 8011 | 8213 | 3 | 2019-05-17 12:57:29 | 0 | NULL |
| 8012 | 8214 | 3 | 2019-05-17 13:31:29 | 0 | NULL |
| 8013 | 8241 | 1 | 2019-05-17 14:29:00 | 1 | Walk |
| 8014 | 8240 | 1 | 2019-05-17 14:29:28 | 1 | Walk |
| 8015 | 8238 | 1 | 2019-05-18 11:54:44 | 1 | Other |
| 8016 | 8239 | 1 | 2019-05-18 11:54:57 | 1 | Other |
| 8017 | 8249 | 1 | 2019-05-19 10:56:44 | 1 | Private Vehicle |
| 8018 | 8250 | 1 | 2019-05-19 10:56:48 | 1 | Private Vehicle |
| 8019 | 8246 | 3 | 2019-05-19 11:46:31 | 1 | Walk |
| 8020 | 8245 | 3 | 2019-05-19 11:46:38 | 1 | Walk |
| 8021 | 8248 | 3 | 2019-05-19 11:46:47 | 1 | Walk |
| 8022 | 8247 | 3 | 2019-05-19 11:47:05 | 1 | Walk |
| 8023 | 8251 | 1 | 2019-05-19 12:54:18 | 1 | Private Vehicle |
| 8024 | 8252 | 1 | 2019-05-19 12:54:32 | 1 | Private Vehicle |
| 8025 | 8253 | 1 | 2019-05-20 10:20:46 | 1 | Taxi |
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;