Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 776–800 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 776 | 851 | 1 | 2015-08-04 10:29:02 | 1 | Metro |
| 777 | 912 | 3 | 2015-08-05 09:09:17 | 1 | Metro |
| 778 | 911 | 3 | 2015-08-05 09:09:18 | 1 | Metro |
| 779 | 913 | 2 | 2015-08-05 10:30:33 | 1 | Walk |
| 780 | 914 | 2 | 2015-08-05 10:31:00 | 1 | Walk |
| 781 | 918 | 2 | 2015-08-06 09:36:59 | 1 | Taxi |
| 782 | 920 | 2 | 2015-08-06 10:27:58 | 1 | Private Vehicle |
| 783 | 922 | 2 | 2015-08-06 10:28:20 | 1 | Private Vehicle |
| 784 | 923 | 2 | 2015-08-06 10:28:20 | 1 | Private Vehicle |
| 785 | 924 | 2 | 2015-08-06 10:28:34 | 1 | Private Vehicle |
| 786 | 921 | 2 | 2015-08-06 10:28:37 | 1 | Private Vehicle |
| 787 | 800 | 3 | 2015-08-06 16:44:09 | 1 | Bus |
| 788 | 802 | 3 | 2015-08-06 16:44:18 | 1 | Bus |
| 789 | 801 | 3 | 2015-08-06 16:44:24 | 1 | Bus |
| 790 | 803 | 3 | 2015-08-06 16:44:30 | 1 | Bus |
| 791 | 926 | 4 | 2015-08-07 10:56:45 | 1 | Walk |
| 792 | 916 | 3 | 2015-08-07 12:25:59 | 1 | Walk |
| 793 | 917 | 3 | 2015-08-07 12:26:03 | 1 | Walk |
| 794 | 915 | 3 | 2015-08-07 12:26:04 | 1 | Walk |
| 795 | 933 | 1 | 2015-08-09 14:24:34 | 1 | Walk |
| 796 | 932 | 1 | 2015-08-09 14:24:38 | 1 | Walk |
| 797 | 938 | 1 | 2015-08-10 09:36:18 | 1 | Metro |
| 798 | 939 | 1 | 2015-08-10 09:36:41 | 1 | Metro |
| 799 | 940 | 1 | 2015-08-10 12:50:02 | 1 | Walk |
| 800 | 889 | 1 | 2015-08-10 15:34:31 | 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;