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,976–2,000 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 1976 | 2107 | 1 | 2016-04-30 11:45:45 | 1 | Private Vehicle |
| 1977 | 2100 | 2 | 2016-04-30 16:25:22 | 1 | Metro |
| 1978 | 2103 | 2 | 2016-04-30 16:25:22 | 1 | Metro |
| 1979 | 2101 | 2 | 2016-04-30 16:25:26 | 1 | Metro |
| 1980 | 2102 | 2 | 2016-04-30 16:25:31 | 1 | Metro |
| 1981 | 2104 | 2 | 2016-04-30 16:25:35 | 1 | Metro |
| 1982 | 2113 | 5 | 2016-05-01 09:44:37 | 1 | Bus |
| 1983 | 2115 | 5 | 2016-05-01 09:44:45 | 1 | Bus |
| 1984 | 2116 | 5 | 2016-05-01 09:45:04 | 1 | Bus |
| 1985 | 2114 | 5 | 2016-05-01 09:45:12 | 1 | Bus |
| 1986 | 2118 | 4 | 2016-05-01 11:32:57 | 1 | Bus |
| 1987 | 2117 | 4 | 2016-05-01 11:33:03 | 1 | Bus |
| 1988 | 2091 | 1 | 2016-05-01 13:04:03 | 1 | Bus |
| 1989 | 2092 | 1 | 2016-05-01 13:04:13 | 1 | Bus |
| 1990 | 2090 | 1 | 2016-05-01 13:04:25 | 1 | Bus |
| 1991 | 2121 | 1 | 2016-05-01 16:59:52 | 1 | Bus |
| 1992 | 2120 | 1 | 2016-05-01 16:59:59 | 1 | Bus |
| 1993 | 2122 | 1 | 2016-05-02 09:14:46 | 1 | Bus |
| 1994 | 2123 | 1 | 2016-05-02 09:15:00 | 1 | Bus |
| 1995 | 2098 | 2 | 2016-05-02 09:51:47 | 1 | Private Vehicle |
| 1996 | 2096 | 2 | 2016-05-02 09:51:55 | 1 | Private Vehicle |
| 1997 | 2097 | 2 | 2016-05-02 09:52:00 | 1 | Private Vehicle |
| 1998 | 2099 | 2 | 2016-05-02 09:52:10 | 1 | Private Vehicle |
| 1999 | 2127 | 3 | 2016-05-02 10:07:47 | 1 | Walk |
| 2000 | 2126 | 3 | 2016-05-02 10:08:01 | 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;