View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,101–2,125 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 2235 | 2016-06-22 | 2016-06-22 09:33:36 | 1 | Walk |
| 2236 | 2016-06-22 | 2016-06-22 09:34:11 | 1 | Walk |
| 2238 | 2016-06-22 | 2016-06-22 09:35:54 | 1 | Walk |
| 2239 | 2016-06-22 | 2016-06-22 09:36:41 | 1 | Walk |
| 2240 | 2016-06-22 | 2016-06-22 09:33:38 | 1 | Walk |
| 2241 | 2016-05-12 | 2016-05-12 14:42:41 | 3 | Private Vehicle |
| 2242 | 2016-05-12 | 2016-05-12 14:42:48 | 3 | Private Vehicle |
| 2243 | 2016-05-12 | 2016-05-12 14:42:57 | 3 | Private Vehicle |
| 2244 | 2016-05-12 | 2016-05-12 14:42:32 | 3 | Private Vehicle |
| 2245 | 2016-05-11 | 2016-05-11 10:23:35 | 2 | Metro |
| 2246 | 2016-05-11 | 2016-05-11 11:38:29 | 1 | Other |
| 2247 | 2016-05-11 | 2016-05-11 11:38:47 | 1 | Other |
| 2248 | 2016-05-12 | 2016-05-12 15:37:18 | 2 | Metro |
| 2249 | 2016-05-13 | 2016-05-13 10:40:34 | 3 | Other |
| 2250 | 2016-05-13 | 2016-05-13 10:40:32 | 3 | Other |
| 2251 | 2016-05-13 | 2016-05-13 12:36:34 | 4 | Bus |
| 2252 | 2016-05-13 | 2016-05-13 12:36:00 | 4 | Bus |
| 2253 | 2016-05-16 | 2016-05-16 12:01:47 | 5 | Other |
| 2254 | 2016-05-28 | 2016-05-28 10:58:38 | 2 | Walk |
| 2255 | 2016-05-16 | 2016-05-16 11:25:09 | 1 | Other |
| 2256 | 2016-05-14 | 2016-05-14 12:10:57 | 2 | Walk |
| 2257 | 2016-05-14 | 2016-05-14 12:51:24 | 4 | Bus |
| 2258 | 2016-05-21 | 2016-05-21 13:54:25 | 5 | Walk |
| 2259 | 2016-06-09 | 2016-06-09 14:43:55 | 5 | Walk |
| 2260 | 2016-06-09 | 2016-06-09 14:44:16 | 5 | Walk |
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;