Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 501–525 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 501 | 696 | 4 | 2015-06-20 10:08:08 | 1 | Other |
| 502 | 695 | 4 | 2015-06-20 10:08:11 | 1 | Other |
| 503 | 703 | 1 | 2015-06-21 12:34:26 | 1 | Other |
| 504 | 704 | 1 | 2015-06-21 12:35:09 | 1 | Other |
| 505 | 702 | 1 | 2015-06-21 12:35:10 | 1 | Other |
| 506 | 705 | 2 | 2015-06-22 10:21:55 | 1 | Private Vehicle |
| 507 | 712 | 1 | 2015-06-23 09:47:16 | 1 | Private Vehicle |
| 508 | 713 | 1 | 2015-06-23 09:47:22 | 1 | Private Vehicle |
| 509 | 683 | 1 | 2015-06-23 10:11:35 | 1 | Taxi |
| 510 | 681 | 1 | 2015-06-23 10:11:37 | 1 | Taxi |
| 511 | 682 | 1 | 2015-06-23 10:12:01 | 1 | Taxi |
| 512 | 714 | 1 | 2015-06-23 11:14:48 | 1 | Metro |
| 513 | 707 | 1 | 2015-06-24 09:54:32 | 1 | Metro |
| 514 | 706 | 1 | 2015-06-24 09:54:33 | 1 | Metro |
| 515 | 708 | 1 | 2015-06-24 09:54:33 | 1 | Metro |
| 516 | 715 | 4 | 2015-06-25 09:12:21 | 1 | Walk |
| 517 | 716 | 4 | 2015-06-25 09:12:42 | 1 | Walk |
| 518 | 711 | 2 | 2015-06-26 09:09:22 | 1 | Metro |
| 519 | 709 | 2 | 2015-06-26 09:09:46 | 1 | Metro |
| 520 | 710 | 2 | 2015-06-26 09:09:47 | 1 | Metro |
| 521 | 717 | 2 | 2015-06-26 14:25:24 | 1 | Metro |
| 522 | 720 | 5 | 2015-06-27 11:37:16 | 1 | Bus |
| 523 | 719 | 5 | 2015-06-27 11:37:53 | 1 | Bus |
| 524 | 721 | 5 | 2015-06-27 12:25:05 | 1 | Metro |
| 525 | 724 | 4 | 2015-06-28 10:43:19 | 1 | Walk |
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;