Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 4,451–4,475 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 4451 | 4231 | 1 | 2017-09-20 12:40:59 | 1 | Other |
| 4452 | 4238 | 1 | 2017-09-20 12:41:13 | 1 | Other |
| 4453 | 4234 | 1 | 2017-09-20 12:41:41 | 1 | Other |
| 4454 | 4233 | 1 | 2017-09-20 12:42:04 | 1 | Other |
| 4455 | 4236 | 1 | 2017-09-20 12:42:09 | 1 | Other |
| 4456 | 4532 | 4 | 2017-09-22 10:10:26 | 1 | Walk |
| 4457 | 4533 | 4 | 2017-09-22 10:10:40 | 1 | Walk |
| 4458 | 4657 | 1 | 2017-09-22 10:57:56 | 1 | Metro |
| 4459 | 4656 | 1 | 2017-09-22 10:58:44 | 1 | Metro |
| 4460 | 4660 | 2 | 2017-09-22 14:58:42 | 1 | Taxi |
| 4461 | 4661 | 2 | 2017-09-22 14:58:56 | 1 | Taxi |
| 4462 | 4647 | 1 | 2017-09-23 13:50:33 | 1 | Taxi |
| 4463 | 4662 | 1 | 2017-09-24 09:41:09 | 1 | Walk |
| 4464 | 4593 | 1 | 2017-09-24 10:04:44 | 1 | Metro |
| 4465 | 4590 | 1 | 2017-09-24 10:05:05 | 1 | Metro |
| 4466 | 4592 | 1 | 2017-09-24 10:05:08 | 1 | Metro |
| 4467 | 4591 | 1 | 2017-09-24 10:05:13 | 1 | Metro |
| 4468 | 4573 | 1 | 2017-09-24 11:49:08 | 1 | Bus |
| 4469 | 4574 | 1 | 2017-09-24 11:49:09 | 1 | Bus |
| 4470 | 4576 | 1 | 2017-09-24 11:49:10 | 1 | Bus |
| 4471 | 4575 | 1 | 2017-09-24 11:49:53 | 1 | Bus |
| 4472 | 4572 | 1 | 2017-09-26 10:49:40 | 1 | Train |
| 4473 | 4571 | 1 | 2017-09-26 10:50:08 | 1 | Train |
| 4474 | 4666 | 1 | 2017-09-26 11:56:40 | 1 | Private Vehicle |
| 4475 | 4664 | 1 | 2017-09-26 11:56:49 | 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;