View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,901–1,925 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 2011 | 2016-03-29 | 2016-03-29 09:40:31 | 1 | Walk |
| 2012 | 2016-03-29 | 2016-03-29 14:00:38 | 1 | Metro |
| 2013 | 2016-04-01 | 2016-04-01 14:17:01 | 4 | Bus |
| 2014 | 2016-04-01 | 2016-04-01 14:16:55 | 4 | Bus |
| 2015 | 2016-04-01 | 2016-04-01 14:17:11 | 4 | Bus |
| 2016 | 2016-04-01 | 2016-04-01 14:17:14 | 4 | Bus |
| 2017 | 2016-04-01 | 2016-04-01 14:16:49 | 4 | Bus |
| 2018 | 2016-04-01 | 2016-04-01 13:55:09 | 2 | Bus |
| 2019 | 2016-04-01 | 2016-04-01 13:55:11 | 2 | Bus |
| 2020 | 2016-04-01 | 2016-04-01 13:55:05 | 2 | Bus |
| 2021 | 2016-04-01 | 2016-04-01 11:48:39 | 2 | Train |
| 2022 | 2016-04-01 | 2016-04-01 11:48:05 | 2 | Train |
| 2023 | 2016-04-01 | 2016-04-01 16:42:19 | 2 | Metro |
| 2024 | 2016-04-01 | 2016-04-01 16:42:41 | 2 | Metro |
| 2025 | 2016-04-15 | 2016-04-15 11:57:34 | 1 | Bus |
| 2026 | 2016-04-15 | 2016-04-15 11:57:29 | 1 | Bus |
| 2027 | 2016-04-15 | 2016-04-15 11:57:51 | 1 | Bus |
| 2028 | 2016-04-05 | 2016-04-05 11:49:09 | 1 | Metro |
| 2029 | 2016-04-06 | 2016-04-06 11:18:46 | 3 | Bus |
| 2030 | 2016-04-07 | 2016-04-07 15:50:46 | 1 | Walk |
| 2031 | 2016-04-08 | 2016-04-08 12:39:03 | 1 | Walk |
| 2032 | 2016-04-08 | 2016-04-08 12:38:51 | 1 | Walk |
| 2033 | 2016-04-08 | 2016-04-08 12:38:55 | 1 | Walk |
| 2034 | 2016-04-08 | 2016-04-08 12:38:45 | 1 | Walk |
| 2035 | 2016-04-15 | 2016-04-15 11:05:54 | 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;