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,376–8,400 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 8376 | 7947 | 4 | 2019-07-14 11:01:58 | 1 | Bus |
| 8377 | 7946 | 4 | 2019-07-14 11:01:59 | 1 | Bus |
| 8378 | 7948 | 4 | 2019-07-14 11:02:11 | 1 | Bus |
| 8379 | 7960 | 4 | 2019-07-14 11:02:27 | 1 | Bus |
| 8380 | 7962 | 4 | 2019-07-14 11:02:43 | 1 | Bus |
| 8381 | 7953 | 4 | 2019-07-14 11:02:55 | 1 | Bus |
| 8382 | 7955 | 4 | 2019-07-14 11:02:56 | 1 | Bus |
| 8383 | 7961 | 4 | 2019-07-14 11:03:04 | 1 | Bus |
| 8384 | 7951 | 4 | 2019-07-14 11:03:09 | 1 | Bus |
| 8385 | 7952 | 4 | 2019-07-14 11:03:43 | 1 | Bus |
| 8386 | 7971 | 4 | 2019-07-14 11:03:55 | 1 | Bus |
| 8387 | 7964 | 4 | 2019-07-14 11:04:03 | 1 | Bus |
| 8388 | 7972 | 4 | 2019-07-14 11:04:03 | 1 | Bus |
| 8389 | 7969 | 4 | 2019-07-14 11:04:16 | 1 | Bus |
| 8390 | 7956 | 4 | 2019-07-14 11:04:43 | 1 | Bus |
| 8391 | 7965 | 4 | 2019-07-14 11:04:46 | 1 | Bus |
| 8392 | 7963 | 4 | 2019-07-14 11:05:57 | 1 | Bus |
| 8393 | 7970 | 4 | 2019-07-14 11:07:35 | 1 | Bus |
| 8394 | 7968 | 4 | 2019-07-14 11:07:43 | 1 | Bus |
| 8395 | 8557 | 3 | 2019-07-14 15:07:29 | 1 | Metro |
| 8396 | 8556 | 3 | 2019-07-14 15:07:51 | 1 | Metro |
| 8397 | 8495 | 2 | 2019-07-15 09:32:31 | 1 | Private Vehicle |
| 8398 | 8494 | 2 | 2019-07-15 09:32:53 | 1 | Private Vehicle |
| 8399 | 8559 | 4 | 2019-07-15 10:01:43 | 1 | Walk |
| 8400 | 8387 | 2 | 2019-07-15 12:28:08 | 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;