Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 601–625 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 601 | 770 | 1 | 2015-07-10 11:55:24 | 1 | Private Vehicle |
| 602 | 769 | 1 | 2015-07-10 11:55:38 | 1 | Private Vehicle |
| 603 | 772 | 1 | 2015-07-11 10:01:58 | 1 | Taxi |
| 604 | 771 | 1 | 2015-07-11 10:02:10 | 1 | Taxi |
| 605 | 773 | 2 | 2015-07-11 10:10:41 | 1 | Walk |
| 606 | 774 | 4 | 2015-07-11 11:27:47 | 1 | Metro |
| 607 | 775 | 4 | 2015-07-11 11:28:09 | 1 | Metro |
| 608 | 718 | 1 | 2015-07-12 10:40:36 | 1 | Metro |
| 609 | 780 | 3 | 2015-07-12 14:17:53 | 1 | Metro |
| 610 | 781 | 3 | 2015-07-12 14:17:55 | 1 | Metro |
| 611 | 779 | 3 | 2015-07-12 14:18:16 | 1 | Metro |
| 612 | 783 | 1 | 2015-07-12 14:33:16 | 1 | Private Vehicle |
| 613 | 782 | 1 | 2015-07-12 14:33:21 | 1 | Private Vehicle |
| 614 | 784 | 1 | 2015-07-12 14:33:21 | 1 | Private Vehicle |
| 615 | 786 | 1 | 2015-07-12 14:33:27 | 1 | Private Vehicle |
| 616 | 785 | 1 | 2015-07-12 14:33:33 | 1 | Private Vehicle |
| 617 | 779 | 3 | 2015-07-12 15:57:21 | 0 | NULL |
| 618 | 781 | 1 | 2015-07-12 16:40:58 | 0 | NULL |
| 619 | 787 | 3 | 2015-07-13 09:32:54 | 1 | Train |
| 620 | 778 | 3 | 2015-07-13 10:05:11 | 1 | Bus |
| 621 | 789 | 2 | 2015-07-13 11:20:09 | 1 | Metro |
| 622 | 788 | 2 | 2015-07-14 09:58:46 | 1 | Walk |
| 623 | 761 | 1 | 2015-07-14 11:37:28 | 1 | Metro |
| 624 | 790 | 3 | 2015-07-14 16:47:11 | 1 | Walk |
| 625 | 777 | 2 | 2015-07-15 13:28:36 | 1 | Metro |
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;