View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 3,301–3,325 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 3499 | 2017-02-24 | 2017-02-24 13:16:19 | 1 | Other |
| 3500 | 2017-02-12 | 2017-02-12 09:16:30 | 3 | Walk |
| 3501 | 2017-02-12 | 2017-02-12 09:16:48 | 3 | Walk |
| 3502 | 2017-02-12 | 2017-02-12 09:17:07 | 3 | Walk |
| 3503 | 2017-02-05 | 2017-02-05 11:08:36 | 2 | Walk |
| 3504 | 2017-02-05 | 2017-02-05 11:08:19 | 2 | Walk |
| 3505 | 2017-02-05 | 2017-02-05 11:12:00 | 2 | Private Vehicle |
| 3506 | 2017-02-05 | 2017-02-05 11:11:39 | 2 | Private Vehicle |
| 3507 | 2017-02-05 | 2017-02-05 11:11:36 | 2 | Private Vehicle |
| 3508 | 2017-02-14 | 2017-02-14 14:33:36 | 1 | Walk |
| 3509 | 2017-02-14 | 2017-02-14 14:33:47 | 1 | Walk |
| 3510 | 2017-02-14 | 2017-02-14 14:33:31 | 1 | Walk |
| 3511 | 2017-03-02 | 2017-03-02 11:32:31 | 1 | Bus |
| 3512 | 2017-03-02 | 2017-03-02 11:32:11 | 1 | Bus |
| 3513 | 2017-02-06 | 2017-02-06 09:08:04 | 1 | Walk |
| 3514 | 2017-03-18 | 2017-03-18 11:10:39 | 2 | Private Vehicle |
| 3515 | 2017-03-18 | 2017-03-18 11:10:24 | 2 | Private Vehicle |
| 3516 | 2017-03-18 | 2017-03-18 11:10:24 | 2 | Private Vehicle |
| 3517 | 2017-03-18 | 2017-03-18 11:10:52 | 2 | Private Vehicle |
| 3518 | 2017-02-26 | 2017-02-26 13:06:25 | 1 | Bus |
| 3519 | 2017-02-26 | 2017-02-26 13:06:38 | 1 | Bus |
| 3520 | 2017-02-26 | 2017-02-26 13:06:23 | 1 | Bus |
| 3521 | 2017-02-11 | 2017-02-11 11:42:59 | 1 | Metro |
| 3522 | 2017-02-11 | 2017-02-11 11:43:31 | 1 | Metro |
| 3523 | 2017-02-11 | 2017-02-11 13:53:12 | 1 | 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;