Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 576–600 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 576 | 749 | 2 | 2015-07-05 11:50:39 | 1 | Private Vehicle |
| 577 | 701 | 2 | 2015-07-05 14:50:16 | 1 | Train |
| 578 | 698 | 2 | 2015-07-05 14:50:24 | 1 | Train |
| 579 | 697 | 2 | 2015-07-05 14:50:38 | 1 | Train |
| 580 | 699 | 2 | 2015-07-05 14:50:44 | 1 | Train |
| 581 | 700 | 2 | 2015-07-05 14:51:01 | 1 | Train |
| 582 | 736 | 2 | 2015-07-05 16:27:30 | 1 | Private Vehicle |
| 583 | 755 | 2 | 2015-07-06 09:14:28 | 1 | Train |
| 584 | 756 | 2 | 2015-07-06 09:14:32 | 1 | Train |
| 585 | 742 | 2 | 2015-07-06 10:34:41 | 1 | Metro |
| 586 | 741 | 2 | 2015-07-06 10:35:07 | 1 | Metro |
| 587 | 757 | 5 | 2015-07-06 11:24:36 | 1 | Metro |
| 588 | 741 | 1 | 2015-07-06 12:49:53 | 0 | NULL |
| 589 | 742 | 2 | 2015-07-06 13:39:51 | 0 | NULL |
| 590 | 743 | 1 | 2015-07-06 16:43:25 | 1 | Walk |
| 591 | 744 | 1 | 2015-07-06 16:43:39 | 1 | Walk |
| 592 | 758 | 1 | 2015-07-07 12:33:18 | 1 | Metro |
| 593 | 732 | 1 | 2015-07-07 15:48:04 | 1 | Train |
| 594 | 760 | 5 | 2015-07-08 12:49:11 | 1 | Walk |
| 595 | 759 | 5 | 2015-07-08 12:49:17 | 1 | Walk |
| 596 | 762 | 4 | 2015-07-09 10:58:54 | 1 | Walk |
| 597 | 763 | 4 | 2015-07-09 10:59:43 | 1 | Walk |
| 598 | 767 | 1 | 2015-07-10 10:48:04 | 1 | Private Vehicle |
| 599 | 766 | 1 | 2015-07-10 10:48:45 | 1 | Private Vehicle |
| 600 | 768 | 1 | 2015-07-10 11:55:14 | 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;