View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 3,026–3,050 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 3186 | 2017-04-06 | 2017-04-06 13:15:54 | 1 | Bus |
| 3187 | 2017-04-06 | 2017-04-06 13:16:01 | 1 | Bus |
| 3188 | 2017-04-06 | 2017-04-06 13:16:08 | 1 | Bus |
| 3189 | 2017-04-06 | 2017-04-06 13:16:30 | 1 | Bus |
| 3190 | 2017-04-06 | 2017-04-06 13:16:38 | 1 | Bus |
| 3191 | 2017-04-06 | 2017-04-06 13:16:49 | 1 | Bus |
| 3192 | 2017-04-06 | 2017-04-06 13:16:36 | 1 | Bus |
| 3195 | 2017-04-06 | 2017-04-06 13:17:25 | 1 | Bus |
| 3198 | 2017-04-06 | 2017-04-06 13:17:54 | 1 | Bus |
| 3199 | 2017-04-06 | 2017-04-06 13:17:24 | 1 | Bus |
| 3201 | 2017-04-06 | 2017-04-06 13:18:24 | 1 | Bus |
| 3202 | 2017-04-06 | 2017-04-06 13:17:00 | 1 | Bus |
| 3203 | 2017-04-06 | 2017-04-06 13:17:30 | 1 | Bus |
| 3207 | 2017-04-06 | 2017-04-06 13:18:30 | 1 | Bus |
| 3208 | 2017-04-06 | 2017-04-06 13:19:24 | 1 | Bus |
| 3209 | 2017-04-06 | 2017-04-06 13:17:09 | 1 | Bus |
| 3211 | 2017-04-06 | 2017-04-06 13:19:54 | 1 | Bus |
| 3212 | 2017-04-06 | 2017-04-06 13:20:09 | 1 | Bus |
| 3214 | 2017-04-06 | 2017-04-06 13:18:18 | 1 | Bus |
| 3215 | 2017-04-06 | 2017-04-06 13:20:01 | 1 | Bus |
| 3216 | 2017-04-06 | 2017-04-06 13:20:14 | 1 | Bus |
| 3217 | 2017-04-06 | 2017-04-06 13:20:27 | 1 | Bus |
| 3218 | 2017-04-06 | 2017-04-06 13:17:22 | 1 | Bus |
| 3219 | 2017-04-06 | 2017-04-06 13:20:07 | 1 | Bus |
| 3220 | 2017-04-06 | 2017-04-06 13:18:42 | 1 | Bus |
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;