Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 301–325 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 301 | 507 | 2 | 2015-05-12 10:39:15 | 1 | Bus |
| 302 | 350 | 1 | 2015-05-12 10:58:43 | 1 | Other |
| 303 | 352 | 1 | 2015-05-12 10:58:46 | 1 | Other |
| 304 | 349 | 1 | 2015-05-12 10:58:51 | 1 | Other |
| 305 | 353 | 1 | 2015-05-12 10:59:06 | 1 | Other |
| 306 | 351 | 1 | 2015-05-12 10:59:14 | 1 | Other |
| 307 | 329 | 3 | 2015-05-13 09:19:08 | 1 | Metro |
| 308 | 330 | 3 | 2015-05-13 09:19:09 | 1 | Metro |
| 309 | 328 | 3 | 2015-05-13 09:19:19 | 1 | Metro |
| 310 | 508 | 5 | 2015-05-13 12:24:18 | 1 | Walk |
| 311 | 509 | 5 | 2015-05-13 12:24:27 | 1 | Walk |
| 312 | 510 | 2 | 2015-05-13 12:59:23 | 1 | Bus |
| 313 | 513 | 2 | 2015-05-13 14:43:21 | 1 | Walk |
| 314 | 511 | 2 | 2015-05-13 14:43:32 | 1 | Walk |
| 315 | 512 | 2 | 2015-05-13 14:43:59 | 1 | Walk |
| 316 | 518 | 1 | 2015-05-14 11:41:29 | 1 | Walk |
| 317 | 525 | 1 | 2015-05-15 09:49:49 | 1 | Taxi |
| 318 | 524 | 1 | 2015-05-15 09:49:56 | 1 | Taxi |
| 319 | 526 | 1 | 2015-05-16 09:11:26 | 1 | Metro |
| 320 | 528 | 1 | 2015-05-16 09:11:36 | 1 | Metro |
| 321 | 527 | 1 | 2015-05-16 09:11:37 | 1 | Metro |
| 322 | 534 | 1 | 2015-05-16 09:39:37 | 1 | Other |
| 323 | 532 | 1 | 2015-05-16 09:39:52 | 1 | Other |
| 324 | 536 | 1 | 2015-05-16 09:39:54 | 1 | Other |
| 325 | 533 | 1 | 2015-05-16 09:40:18 | 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;