Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 3,226–3,250 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 3226 | 3547 | 5 | 2017-02-22 14:43:08 | 1 | Walk |
| 3227 | 3549 | 5 | 2017-02-22 14:43:16 | 1 | Walk |
| 3228 | 3552 | 4 | 2017-02-23 10:18:38 | 1 | Metro |
| 3229 | 3551 | 4 | 2017-02-23 10:18:51 | 1 | Metro |
| 3230 | 3081 | 4 | 2017-02-24 10:59:13 | 1 | Bus |
| 3231 | 3082 | 4 | 2017-02-24 10:59:22 | 1 | Bus |
| 3232 | 3084 | 4 | 2017-02-24 10:59:37 | 1 | Bus |
| 3233 | 3083 | 4 | 2017-02-24 10:59:41 | 1 | Bus |
| 3234 | 3086 | 4 | 2017-02-24 10:59:43 | 1 | Bus |
| 3235 | 3087 | 4 | 2017-02-24 10:59:55 | 1 | Bus |
| 3236 | 3085 | 4 | 2017-02-24 11:00:01 | 1 | Bus |
| 3237 | 3093 | 4 | 2017-02-24 11:00:13 | 1 | Bus |
| 3238 | 3089 | 4 | 2017-02-24 11:00:25 | 1 | Bus |
| 3239 | 3100 | 4 | 2017-02-24 11:00:48 | 1 | Bus |
| 3240 | 3088 | 4 | 2017-02-24 11:00:51 | 1 | Bus |
| 3241 | 3107 | 4 | 2017-02-24 11:00:57 | 1 | Bus |
| 3242 | 3098 | 4 | 2017-02-24 11:01:12 | 1 | Bus |
| 3243 | 3090 | 4 | 2017-02-24 11:01:28 | 1 | Bus |
| 3244 | 3094 | 4 | 2017-02-24 11:01:36 | 1 | Bus |
| 3245 | 3091 | 4 | 2017-02-24 11:01:43 | 1 | Bus |
| 3246 | 3092 | 4 | 2017-02-24 11:01:58 | 1 | Bus |
| 3247 | 3096 | 4 | 2017-02-24 11:01:58 | 1 | Bus |
| 3248 | 3105 | 4 | 2017-02-24 11:02:01 | 1 | Bus |
| 3249 | 3116 | 4 | 2017-02-24 11:02:08 | 1 | Bus |
| 3250 | 3103 | 4 | 2017-02-24 11:02:09 | 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;