Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 701–725 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 701 | 871 | 2 | 2015-07-29 09:36:34 | 1 | Walk |
| 702 | 872 | 2 | 2015-07-29 09:36:34 | 1 | Walk |
| 703 | 866 | 5 | 2015-07-29 11:23:38 | 1 | Other |
| 704 | 865 | 5 | 2015-07-29 11:23:46 | 1 | Other |
| 705 | 888 | 1 | 2015-07-29 13:00:13 | 1 | Metro |
| 706 | 887 | 1 | 2015-07-29 13:00:22 | 1 | Metro |
| 707 | 891 | 3 | 2015-07-30 10:59:37 | 1 | Walk |
| 708 | 892 | 3 | 2015-07-30 11:00:00 | 1 | Walk |
| 709 | 896 | 2 | 2015-08-01 09:37:56 | 1 | Taxi |
| 710 | 895 | 2 | 2015-08-01 09:37:58 | 1 | Taxi |
| 711 | 897 | 4 | 2015-08-01 11:43:25 | 1 | Bus |
| 712 | 361 | 4 | 2015-08-02 11:53:12 | 1 | Bus |
| 713 | 362 | 4 | 2015-08-02 11:53:16 | 1 | Bus |
| 714 | 363 | 4 | 2015-08-02 11:53:20 | 1 | Bus |
| 715 | 364 | 4 | 2015-08-02 11:53:42 | 1 | Bus |
| 716 | 365 | 4 | 2015-08-02 11:53:52 | 1 | Bus |
| 717 | 366 | 4 | 2015-08-02 11:54:07 | 1 | Bus |
| 718 | 368 | 4 | 2015-08-02 11:54:08 | 1 | Bus |
| 719 | 369 | 4 | 2015-08-02 11:54:24 | 1 | Bus |
| 720 | 367 | 4 | 2015-08-02 11:54:30 | 1 | Bus |
| 721 | 381 | 4 | 2015-08-02 11:54:37 | 1 | Bus |
| 722 | 374 | 4 | 2015-08-02 11:54:48 | 1 | Bus |
| 723 | 373 | 4 | 2015-08-02 11:54:51 | 1 | Bus |
| 724 | 390 | 4 | 2015-08-02 11:54:56 | 1 | Bus |
| 725 | 385 | 4 | 2015-08-02 11:54:57 | 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;