Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 751–775 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 751 | 408 | 4 | 2015-08-02 11:59:39 | 1 | Bus |
| 752 | 415 | 4 | 2015-08-02 11:59:44 | 1 | Bus |
| 753 | 397 | 4 | 2015-08-02 11:59:48 | 1 | Bus |
| 754 | 416 | 4 | 2015-08-02 11:59:52 | 1 | Bus |
| 755 | 406 | 4 | 2015-08-02 12:00:02 | 1 | Bus |
| 756 | 419 | 4 | 2015-08-02 12:00:16 | 1 | Bus |
| 757 | 414 | 4 | 2015-08-02 12:00:24 | 1 | Bus |
| 758 | 393 | 4 | 2015-08-02 12:00:27 | 1 | Bus |
| 759 | 407 | 4 | 2015-08-02 12:00:54 | 1 | Bus |
| 760 | 410 | 4 | 2015-08-02 12:01:16 | 1 | Bus |
| 761 | 412 | 4 | 2015-08-02 12:01:38 | 1 | Bus |
| 762 | 399 | 4 | 2015-08-02 12:01:57 | 1 | Bus |
| 763 | 404 | 4 | 2015-08-02 12:02:18 | 1 | Bus |
| 764 | 418 | 4 | 2015-08-02 12:03:36 | 1 | Bus |
| 765 | 417 | 4 | 2015-08-02 12:04:15 | 1 | Bus |
| 766 | 860 | 1 | 2015-08-02 14:45:31 | 1 | Bus |
| 767 | 859 | 1 | 2015-08-02 14:46:20 | 1 | Bus |
| 768 | 902 | 1 | 2015-08-03 10:26:54 | 1 | Taxi |
| 769 | 900 | 1 | 2015-08-03 10:27:12 | 1 | Taxi |
| 770 | 901 | 1 | 2015-08-03 10:27:39 | 1 | Taxi |
| 771 | 894 | 1 | 2015-08-03 12:51:30 | 1 | Walk |
| 772 | 893 | 1 | 2015-08-03 12:51:48 | 1 | Walk |
| 773 | 906 | 1 | 2015-08-04 09:09:39 | 1 | Bus |
| 774 | 905 | 2 | 2015-08-04 10:11:52 | 1 | Metro |
| 775 | 850 | 1 | 2015-08-04 10:28:50 | 1 | Metro |
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;