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,876–1,900 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 1876 | 1985 | 1 | 2016-03-28 11:05:22 | 1 | Other |
| 1877 | 1986 | 1 | 2016-03-28 11:05:43 | 1 | Other |
| 1878 | 1984 | 1 | 2016-03-28 11:05:45 | 1 | Other |
| 1879 | 1957 | 1 | 2016-03-28 11:41:45 | 1 | Walk |
| 1880 | 1958 | 1 | 2016-03-28 11:42:16 | 1 | Walk |
| 1881 | 2006 | 2 | 2016-03-28 12:04:57 | 1 | Metro |
| 1882 | 2007 | 5 | 2016-03-28 15:01:15 | 1 | Taxi |
| 1883 | 1991 | 1 | 2016-03-29 09:08:12 | 1 | Bus |
| 1884 | 1994 | 1 | 2016-03-29 09:08:22 | 1 | Bus |
| 1885 | 1995 | 1 | 2016-03-29 09:08:23 | 1 | Bus |
| 1886 | 1993 | 1 | 2016-03-29 09:08:49 | 1 | Bus |
| 1887 | 2009 | 1 | 2016-03-29 09:39:59 | 1 | Walk |
| 1888 | 2008 | 1 | 2016-03-29 09:40:09 | 1 | Walk |
| 1889 | 2011 | 1 | 2016-03-29 09:40:31 | 1 | Walk |
| 1890 | 2010 | 1 | 2016-03-29 09:40:37 | 1 | Walk |
| 1891 | 2012 | 1 | 2016-03-29 14:00:38 | 1 | Metro |
| 1892 | 2022 | 2 | 2016-04-01 11:48:05 | 1 | Train |
| 1893 | 2021 | 2 | 2016-04-01 11:48:39 | 1 | Train |
| 1894 | 2020 | 2 | 2016-04-01 13:55:05 | 1 | Bus |
| 1895 | 2018 | 2 | 2016-04-01 13:55:09 | 1 | Bus |
| 1896 | 2019 | 2 | 2016-04-01 13:55:11 | 1 | Bus |
| 1897 | 2004 | 4 | 2016-04-01 14:01:02 | 1 | Bus |
| 1898 | 2005 | 4 | 2016-04-01 14:01:24 | 1 | Bus |
| 1899 | 2001 | 4 | 2016-04-01 14:01:45 | 1 | Bus |
| 1900 | 2003 | 4 | 2016-04-01 14:01:46 | 1 | Bus |
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;