Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 801–825 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 801 | 890 | 1 | 2015-08-10 15:34:40 | 1 | Walk |
| 802 | 927 | 1 | 2015-08-11 09:25:58 | 1 | Walk |
| 803 | 944 | 3 | 2015-08-11 13:54:53 | 1 | Train |
| 804 | 935 | 2 | 2015-08-11 14:19:10 | 1 | Private Vehicle |
| 805 | 937 | 2 | 2015-08-11 14:19:20 | 1 | Private Vehicle |
| 806 | 934 | 2 | 2015-08-11 14:19:30 | 1 | Private Vehicle |
| 807 | 936 | 2 | 2015-08-11 14:19:41 | 1 | Private Vehicle |
| 808 | 950 | 3 | 2015-08-12 10:19:21 | 1 | Taxi |
| 809 | 949 | 3 | 2015-08-12 10:20:03 | 1 | Taxi |
| 810 | 947 | 4 | 2015-08-12 14:49:36 | 1 | Bus |
| 811 | 948 | 4 | 2015-08-12 14:49:46 | 1 | Bus |
| 812 | 953 | 3 | 2015-08-12 15:50:16 | 1 | Metro |
| 813 | 954 | 3 | 2015-08-12 15:50:17 | 1 | Metro |
| 814 | 957 | 1 | 2015-08-13 13:31:26 | 1 | Metro |
| 815 | 956 | 1 | 2015-08-13 13:31:46 | 1 | Metro |
| 816 | 955 | 1 | 2015-08-13 13:32:00 | 1 | Metro |
| 817 | 962 | 4 | 2015-08-13 14:47:20 | 1 | Metro |
| 818 | 967 | 1 | 2015-08-14 15:24:11 | 1 | Metro |
| 819 | 965 | 1 | 2015-08-14 15:24:27 | 1 | Metro |
| 820 | 966 | 1 | 2015-08-14 15:24:36 | 1 | Metro |
| 821 | 969 | 1 | 2015-08-15 10:58:21 | 1 | Train |
| 822 | 968 | 1 | 2015-08-15 10:58:36 | 1 | Train |
| 823 | 970 | 1 | 2015-08-15 10:58:42 | 1 | Train |
| 824 | 971 | 1 | 2015-08-15 11:59:48 | 1 | Metro |
| 825 | 876 | 1 | 2015-08-15 12:20:09 | 1 | Other |
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;