Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 1,426–1,450 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 1426 | 1415 | 1 | 2015-12-07 12:10:06 | 1 | Bus |
| 1427 | 1398 | 1 | 2015-12-07 12:10:24 | 1 | Bus |
| 1428 | 1393 | 1 | 2015-12-07 12:10:26 | 1 | Bus |
| 1429 | 1397 | 1 | 2015-12-07 12:10:59 | 1 | Bus |
| 1430 | 1402 | 1 | 2015-12-07 12:11:08 | 1 | Bus |
| 1431 | 1409 | 1 | 2015-12-07 12:11:15 | 1 | Bus |
| 1432 | 1406 | 1 | 2015-12-07 12:11:20 | 1 | Bus |
| 1433 | 1408 | 1 | 2015-12-07 12:11:40 | 1 | Bus |
| 1434 | 1410 | 1 | 2015-12-07 12:12:36 | 1 | Bus |
| 1435 | 1412 | 1 | 2015-12-07 12:13:36 | 1 | Bus |
| 1436 | 1413 | 1 | 2015-12-07 12:15:45 | 1 | Bus |
| 1437 | 1414 | 1 | 2015-12-07 12:16:00 | 1 | Bus |
| 1438 | 1566 | 3 | 2015-12-07 12:26:50 | 1 | Metro |
| 1439 | 1567 | 1 | 2015-12-08 10:25:37 | 1 | Metro |
| 1440 | 1204 | 4 | 2015-12-08 12:18:15 | 1 | Metro |
| 1441 | 1205 | 4 | 2015-12-08 12:18:19 | 1 | Metro |
| 1442 | 1208 | 4 | 2015-12-08 12:18:35 | 1 | Metro |
| 1443 | 1206 | 4 | 2015-12-08 12:18:45 | 1 | Metro |
| 1444 | 1207 | 4 | 2015-12-08 12:18:54 | 1 | Metro |
| 1445 | 1209 | 4 | 2015-12-08 12:19:05 | 1 | Metro |
| 1446 | 1211 | 4 | 2015-12-08 12:19:18 | 1 | Metro |
| 1447 | 1212 | 4 | 2015-12-08 12:19:19 | 1 | Metro |
| 1448 | 1228 | 4 | 2015-12-08 12:19:23 | 1 | Metro |
| 1449 | 1210 | 4 | 2015-12-08 12:19:27 | 1 | Metro |
| 1450 | 1235 | 4 | 2015-12-08 12:19:43 | 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;