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,276–6,300 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 6276 | 5925 | 4 | 2018-08-27 10:09:57 | 1 | Bus |
| 6277 | 5929 | 4 | 2018-08-27 10:10:00 | 1 | Bus |
| 6278 | 5923 | 4 | 2018-08-27 10:10:06 | 1 | Bus |
| 6279 | 5930 | 4 | 2018-08-27 10:10:08 | 1 | Bus |
| 6280 | 5924 | 4 | 2018-08-27 10:10:16 | 1 | Bus |
| 6281 | 5917 | 4 | 2018-08-27 10:10:51 | 1 | Bus |
| 6282 | 5921 | 4 | 2018-08-27 10:11:01 | 1 | Bus |
| 6283 | 5935 | 4 | 2018-08-27 10:11:27 | 1 | Bus |
| 6284 | 5928 | 4 | 2018-08-27 10:11:28 | 1 | Bus |
| 6285 | 5920 | 4 | 2018-08-27 10:11:36 | 1 | Bus |
| 6286 | 5934 | 4 | 2018-08-27 10:12:34 | 1 | Bus |
| 6287 | 5927 | 4 | 2018-08-27 10:13:21 | 1 | Bus |
| 6288 | 5936 | 4 | 2018-08-27 10:13:36 | 1 | Bus |
| 6289 | 5931 | 4 | 2018-08-27 10:14:21 | 1 | Bus |
| 6290 | 6566 | 1 | 2018-08-27 10:25:41 | 1 | Walk |
| 6291 | 5707 | 1 | 2018-08-27 10:26:54 | 1 | Bus |
| 6292 | 5708 | 1 | 2018-08-27 10:27:01 | 1 | Bus |
| 6293 | 5710 | 1 | 2018-08-27 10:27:10 | 1 | Bus |
| 6294 | 5713 | 1 | 2018-08-27 10:27:34 | 1 | Bus |
| 6295 | 5711 | 1 | 2018-08-27 10:27:39 | 1 | Bus |
| 6296 | 5714 | 1 | 2018-08-27 10:27:42 | 1 | Bus |
| 6297 | 5720 | 1 | 2018-08-27 10:27:44 | 1 | Bus |
| 6298 | 5712 | 1 | 2018-08-27 10:27:46 | 1 | Bus |
| 6299 | 5715 | 1 | 2018-08-27 10:28:18 | 1 | Bus |
| 6300 | 5727 | 1 | 2018-08-27 10:28:25 | 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;