Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 551–575 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 551 | 188 | 1 | 2015-06-30 13:48:49 | 1 | Bus |
| 552 | 195 | 1 | 2015-06-30 13:48:49 | 1 | Bus |
| 553 | 194 | 1 | 2015-06-30 13:49:21 | 1 | Bus |
| 554 | 189 | 1 | 2015-06-30 13:49:46 | 1 | Bus |
| 555 | 193 | 1 | 2015-06-30 13:49:49 | 1 | Bus |
| 556 | 192 | 1 | 2015-06-30 13:49:55 | 1 | Bus |
| 557 | 197 | 1 | 2015-06-30 13:50:14 | 1 | Bus |
| 558 | 729 | 2 | 2015-07-01 09:11:37 | 1 | Bus |
| 559 | 728 | 2 | 2015-07-01 09:12:03 | 1 | Bus |
| 560 | 731 | 1 | 2015-07-01 11:04:58 | 1 | Walk |
| 561 | 730 | 1 | 2015-07-01 11:05:12 | 1 | Walk |
| 562 | 733 | 1 | 2015-07-02 10:52:45 | 1 | Metro |
| 563 | 735 | 3 | 2015-07-02 11:27:51 | 1 | Metro |
| 564 | 734 | 3 | 2015-07-02 11:28:09 | 1 | Metro |
| 565 | 737 | 1 | 2015-07-03 10:49:18 | 1 | Bus |
| 566 | 740 | 4 | 2015-07-03 14:36:13 | 1 | Walk |
| 567 | 739 | 4 | 2015-07-03 14:36:21 | 1 | Walk |
| 568 | 738 | 4 | 2015-07-03 14:36:22 | 1 | Walk |
| 569 | 745 | 1 | 2015-07-04 09:30:51 | 1 | Walk |
| 570 | 746 | 1 | 2015-07-05 09:47:22 | 1 | Walk |
| 571 | 747 | 3 | 2015-07-05 10:18:01 | 1 | Metro |
| 572 | 748 | 3 | 2015-07-05 10:18:38 | 1 | Metro |
| 573 | 750 | 2 | 2015-07-05 11:49:55 | 1 | Private Vehicle |
| 574 | 752 | 2 | 2015-07-05 11:50:00 | 1 | Private Vehicle |
| 575 | 751 | 2 | 2015-07-05 11:50:03 | 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;