Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 201–225 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 201 | 38 | 4 | 2015-04-25 10:48:59 | 1 | Bus |
| 202 | 33 | 4 | 2015-04-25 10:49:19 | 1 | Bus |
| 203 | 32 | 4 | 2015-04-25 10:49:29 | 1 | Bus |
| 204 | 56 | 4 | 2015-04-25 10:49:53 | 1 | Bus |
| 205 | 40 | 4 | 2015-04-25 10:50:25 | 1 | Bus |
| 206 | 41 | 4 | 2015-04-25 10:50:38 | 1 | Bus |
| 207 | 47 | 4 | 2015-04-25 10:50:38 | 1 | Bus |
| 208 | 52 | 4 | 2015-04-25 10:50:49 | 1 | Bus |
| 209 | 57 | 4 | 2015-04-25 10:50:50 | 1 | Bus |
| 210 | 45 | 4 | 2015-04-25 10:50:53 | 1 | Bus |
| 211 | 44 | 4 | 2015-04-25 10:51:17 | 1 | Bus |
| 212 | 61 | 4 | 2015-04-25 10:51:26 | 1 | Bus |
| 213 | 62 | 4 | 2015-04-25 10:51:35 | 1 | Bus |
| 214 | 51 | 4 | 2015-04-25 10:52:05 | 1 | Bus |
| 215 | 55 | 4 | 2015-04-25 10:52:06 | 1 | Bus |
| 216 | 63 | 4 | 2015-04-25 10:52:39 | 1 | Bus |
| 217 | 54 | 4 | 2015-04-25 10:52:41 | 1 | Bus |
| 218 | 59 | 4 | 2015-04-25 10:52:50 | 1 | Bus |
| 219 | 58 | 4 | 2015-04-25 10:54:19 | 1 | Bus |
| 220 | 53 | 4 | 2015-04-25 10:54:44 | 1 | Bus |
| 221 | 60 | 4 | 2015-04-25 10:54:45 | 1 | Bus |
| 222 | 64 | 4 | 2015-04-25 10:55:37 | 1 | Bus |
| 223 | 310 | 2 | 2015-04-26 09:06:14 | 1 | Private Vehicle |
| 224 | 311 | 2 | 2015-04-26 09:06:15 | 1 | Private Vehicle |
| 225 | 314 | 2 | 2015-04-26 09:06:25 | 1 | Private Vehicle |
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;