Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 826–850 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 826 | 873 | 1 | 2015-08-15 12:20:12 | 1 | Other |
| 827 | 874 | 1 | 2015-08-15 12:20:16 | 1 | Other |
| 828 | 875 | 1 | 2015-08-15 12:20:44 | 1 | Other |
| 829 | 941 | 4 | 2015-08-15 13:30:38 | 1 | Walk |
| 830 | 943 | 4 | 2015-08-15 13:31:08 | 1 | Walk |
| 831 | 942 | 4 | 2015-08-15 13:31:25 | 1 | Walk |
| 832 | 973 | 3 | 2015-08-15 15:01:58 | 1 | Bus |
| 833 | 972 | 3 | 2015-08-15 15:02:18 | 1 | Bus |
| 834 | 974 | 5 | 2015-08-15 15:11:55 | 1 | Train |
| 835 | 925 | 1 | 2015-08-15 15:59:27 | 1 | Bus |
| 836 | 963 | 4 | 2015-08-16 11:18:27 | 1 | Bus |
| 837 | 964 | 1 | 2015-08-16 11:53:55 | 1 | Walk |
| 838 | 975 | 2 | 2015-08-16 15:44:15 | 1 | Walk |
| 839 | 976 | 2 | 2015-08-17 10:02:13 | 1 | Train |
| 840 | 977 | 2 | 2015-08-17 10:02:20 | 1 | Train |
| 841 | 978 | 2 | 2015-08-17 10:02:53 | 1 | Train |
| 842 | 919 | 1 | 2015-08-18 09:24:01 | 1 | Metro |
| 843 | 984 | 2 | 2015-08-18 10:38:48 | 1 | Private Vehicle |
| 844 | 983 | 2 | 2015-08-18 10:38:49 | 1 | Private Vehicle |
| 845 | 985 | 4 | 2015-08-18 14:53:23 | 1 | Other |
| 846 | 986 | 4 | 2015-08-18 14:54:13 | 1 | Other |
| 847 | 986 | 4 | 2015-08-18 16:56:44 | 0 | NULL |
| 848 | 991 | 1 | 2015-08-20 11:10:34 | 1 | Walk |
| 849 | 992 | 4 | 2015-08-20 13:15:39 | 1 | Walk |
| 850 | 993 | 4 | 2015-08-20 13:15:43 | 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;