Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 5,501–5,525 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 5501 | 5699 | 1 | 2018-05-06 09:43:37 | 1 | Metro |
| 5502 | 5696 | 1 | 2018-05-06 09:57:27 | 1 | Private Vehicle |
| 5503 | 5695 | 1 | 2018-05-06 09:57:41 | 1 | Private Vehicle |
| 5504 | 5655 | 4 | 2018-05-06 10:13:46 | 1 | Metro |
| 5505 | 5656 | 4 | 2018-05-06 10:14:05 | 1 | Metro |
| 5506 | 5579 | 1 | 2018-05-06 13:16:21 | 1 | Other |
| 5507 | 5578 | 1 | 2018-05-06 13:16:35 | 1 | Other |
| 5508 | 5581 | 1 | 2018-05-06 13:16:44 | 1 | Other |
| 5509 | 5580 | 1 | 2018-05-06 13:16:50 | 1 | Other |
| 5510 | 5377 | 4 | 2018-05-07 11:53:31 | 1 | Bus |
| 5511 | 5378 | 4 | 2018-05-07 11:53:39 | 1 | Bus |
| 5512 | 5380 | 4 | 2018-05-07 11:53:46 | 1 | Bus |
| 5513 | 5379 | 4 | 2018-05-07 11:53:49 | 1 | Bus |
| 5514 | 5382 | 4 | 2018-05-07 11:54:01 | 1 | Bus |
| 5515 | 5381 | 4 | 2018-05-07 11:54:15 | 1 | Bus |
| 5516 | 5386 | 4 | 2018-05-07 11:54:34 | 1 | Bus |
| 5517 | 5387 | 4 | 2018-05-07 11:54:41 | 1 | Bus |
| 5518 | 5388 | 4 | 2018-05-07 11:54:59 | 1 | Bus |
| 5519 | 5383 | 4 | 2018-05-07 11:55:01 | 1 | Bus |
| 5520 | 5402 | 4 | 2018-05-07 11:55:11 | 1 | Bus |
| 5521 | 5384 | 4 | 2018-05-07 11:55:16 | 1 | Bus |
| 5522 | 5398 | 4 | 2018-05-07 11:55:16 | 1 | Bus |
| 5523 | 5393 | 4 | 2018-05-07 11:55:23 | 1 | Bus |
| 5524 | 5390 | 4 | 2018-05-07 11:55:28 | 1 | Bus |
| 5525 | 5394 | 4 | 2018-05-07 11:55:30 | 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;