View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,701–5,725 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 6011 | 2018-07-17 | 2018-07-17 10:02:58 | 4 | Other |
| 6012 | 2018-07-17 | 2018-07-17 09:57:59 | 4 | Other |
| 6013 | 2018-07-17 | 2018-07-17 09:55:27 | 4 | Other |
| 6014 | 2018-07-17 | 2018-07-17 09:56:25 | 4 | Other |
| 6015 | 2018-06-10 | 2018-06-10 10:41:39 | 2 | Private Vehicle |
| 6016 | 2018-06-10 | 2018-06-10 10:58:28 | 2 | Metro |
| 6017 | 2018-06-10 | 2018-06-10 10:58:01 | 2 | Metro |
| 6018 | 2018-06-23 | 2018-06-23 13:59:41 | 2 | Metro |
| 6019 | 2018-06-23 | 2018-06-23 13:59:31 | 2 | Metro |
| 6020 | 2018-06-23 | 2018-06-23 13:59:41 | 2 | Metro |
| 6021 | 2018-06-10 | 2018-06-10 12:34:40 | 1 | Train |
| 6022 | 2018-06-11 | 2018-06-11 16:23:15 | 3 | Other |
| 6023 | 2018-06-15 | 2018-06-15 11:01:01 | 5 | Walk |
| 6024 | 2018-06-15 | 2018-06-15 11:00:50 | 5 | Walk |
| 6025 | 2018-06-13 | 2018-06-13 11:01:40 | 2 | Bus |
| 6026 | 2018-06-17 | 2018-06-17 11:24:32 | 1 | Other |
| 6027 | 2018-06-17 | 2018-06-17 11:24:17 | 1 | Other |
| 6028 | 2018-06-12 | 2018-06-12 15:02:47 | 2 | Bus |
| 6029 | 2018-06-12 | 2018-06-12 15:12:52 | 5 | Walk |
| 6030 | 2018-06-12 | 2018-06-12 15:13:11 | 5 | Walk |
| 6031 | 2018-06-12 | 2018-06-12 15:12:56 | 5 | Walk |
| 6032 | 2018-06-15 | 2018-06-15 13:23:00 | 2 | Private Vehicle |
| 6033 | 2018-06-15 | 2018-06-15 13:22:55 | 2 | Private Vehicle |
| 6034 | 2018-06-15 | 2018-06-15 13:23:31 | 2 | Private Vehicle |
| 6035 | 2018-06-15 | 2018-06-15 13:22:53 | 2 | Private Vehicle |
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;