View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,851–8,875 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9290 | 2019-12-20 | 2019-12-20 14:02:18 | 4 | Bus |
| 9291 | 2019-11-08 | 2019-11-08 12:51:25 | 1 | Taxi |
| 9292 | 2019-11-02 | 2019-11-02 10:20:48 | 1 | Walk |
| 9293 | 2019-10-25 | 2019-10-25 13:54:50 | 1 | Walk |
| 9294 | 2019-10-25 | 2019-10-25 13:55:16 | 1 | Walk |
| 9295 | 2019-10-22 | 2019-10-22 11:40:18 | 3 | Walk |
| 9296 | 2019-10-26 | 2019-10-26 10:23:59 | 1 | Metro |
| 9297 | 2019-10-26 | 2019-10-26 10:24:07 | 1 | Metro |
| 9298 | 2019-10-23 | 2019-10-23 09:44:54 | 2 | Private Vehicle |
| 9299 | 2019-10-23 | 2019-10-23 09:44:30 | 2 | Private Vehicle |
| 9302 | 2019-10-23 | 2019-10-23 14:00:28 | 1 | Walk |
| 9303 | 2019-11-03 | 2019-11-03 14:05:19 | 1 | Private Vehicle |
| 9304 | 2019-10-25 | 2019-10-25 09:36:51 | 2 | Metro |
| 9305 | 2019-10-25 | 2019-10-25 09:36:30 | 2 | Metro |
| 9306 | 2019-11-13 | 2019-11-13 14:53:18 | 3 | Walk |
| 9307 | 2019-10-29 | 2019-10-29 13:17:59 | 2 | Metro |
| 9308 | 2019-10-29 | 2019-10-29 13:18:04 | 2 | Metro |
| 9309 | 2019-10-27 | 2019-10-27 15:04:36 | 2 | Metro |
| 9310 | 2019-10-27 | 2019-10-27 15:04:50 | 2 | Metro |
| 9311 | 2019-10-29 | 2019-10-29 10:29:45 | 1 | Walk |
| 9312 | 2019-10-29 | 2019-10-29 10:28:58 | 1 | Walk |
| 9313 | 2019-10-29 | 2019-10-29 13:12:19 | 2 | Bus |
| 9314 | 2019-10-29 | 2019-10-29 13:11:35 | 2 | Bus |
| 9315 | 2019-10-29 | 2019-10-29 13:12:16 | 2 | Bus |
| 9316 | 2019-10-29 | 2019-10-29 13:12:22 | 2 | 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;