View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,101–1,125 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1172 | 2015-11-10 | 2015-11-10 09:50:06 | 4 | Other |
| 1173 | 2015-11-10 | 2015-11-10 09:50:12 | 4 | Other |
| 1174 | 2015-11-10 | 2015-11-10 09:50:56 | 4 | Other |
| 1175 | 2015-09-18 | 2015-09-18 12:18:49 | 2 | Private Vehicle |
| 1176 | 2015-09-18 | 2015-09-18 12:18:57 | 2 | Private Vehicle |
| 1177 | 2015-09-29 | 2015-09-29 09:47:05 | 3 | Walk |
| 1178 | 2015-09-19 | 2015-09-19 10:25:33 | 5 | Walk |
| 1179 | 2015-09-19 | 2015-09-19 11:06:20 | 1 | Other |
| 1180 | 2015-09-19 | 2015-09-19 11:06:09 | 1 | Other |
| 1181 | 2015-09-20 | 2015-09-20 10:41:49 | 1 | Metro |
| 1182 | 2015-09-20 | 2015-09-20 10:41:15 | 1 | Metro |
| 1183 | 2015-09-20 | 2015-09-20 11:15:43 | 4 | Taxi |
| 1184 | 2015-09-20 | 2015-09-20 11:15:41 | 4 | Taxi |
| 1185 | 2015-09-20 | 2015-09-20 12:16:26 | 1 | Walk |
| 1186 | 2015-09-20 | 2015-09-20 14:57:24 | 2 | Metro |
| 1187 | 2015-09-20 | 2015-09-20 14:57:40 | 2 | Metro |
| 1188 | 2015-10-07 | 2015-10-07 13:26:45 | 5 | Walk |
| 1189 | 2015-10-07 | 2015-10-07 13:26:55 | 5 | Walk |
| 1190 | 2015-09-22 | 2015-09-22 11:30:53 | 2 | Bus |
| 1191 | 2015-09-22 | 2015-09-22 12:28:23 | 5 | Walk |
| 1192 | 2015-09-22 | 2015-09-22 12:28:16 | 5 | Walk |
| 1193 | 2015-09-24 | 2015-09-24 10:11:47 | 2 | Walk |
| 1194 | 2015-09-23 | 2015-09-23 10:10:23 | 1 | Train |
| 1195 | 2015-09-23 | 2015-09-23 10:10:24 | 1 | Train |
| 1196 | 2015-09-23 | 2015-09-23 11:37:27 | 2 | Metro |
View definition
CREATE VIEW museum_visit AS
SELECT
e.ticket_id,
date(e.scanned_at) AS visit_date,
e.scanned_at AS first_entry_at,
e.entrance_id,
e.transport_mode
FROM entry_scan e
WHERE e.is_first_entry = 1;