View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 7,276–7,300 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 7658 | 2019-02-18 | 2019-02-18 10:39:44 | 3 | Walk |
| 7659 | 2019-03-06 | 2019-03-06 10:27:06 | 3 | Walk |
| 7660 | 2019-04-19 | 2019-04-19 13:07:21 | 4 | Bus |
| 7661 | 2019-04-19 | 2019-04-19 13:07:27 | 4 | Bus |
| 7663 | 2019-04-19 | 2019-04-19 13:07:33 | 4 | Bus |
| 7665 | 2019-04-19 | 2019-04-19 13:07:57 | 4 | Bus |
| 7667 | 2019-04-19 | 2019-04-19 13:08:13 | 4 | Bus |
| 7668 | 2019-04-19 | 2019-04-19 13:08:36 | 4 | Bus |
| 7670 | 2019-04-19 | 2019-04-19 13:08:45 | 4 | Bus |
| 7671 | 2019-04-19 | 2019-04-19 13:08:38 | 4 | Bus |
| 7673 | 2019-04-19 | 2019-04-19 13:08:09 | 4 | Bus |
| 7674 | 2019-04-19 | 2019-04-19 13:08:51 | 4 | Bus |
| 7675 | 2019-04-19 | 2019-04-19 13:08:41 | 4 | Bus |
| 7676 | 2019-04-19 | 2019-04-19 13:09:55 | 4 | Bus |
| 7677 | 2019-04-19 | 2019-04-19 13:08:09 | 4 | Bus |
| 7678 | 2019-04-19 | 2019-04-19 13:08:13 | 4 | Bus |
| 7680 | 2019-04-19 | 2019-04-19 13:08:17 | 4 | Bus |
| 7681 | 2019-04-19 | 2019-04-19 13:08:36 | 4 | Bus |
| 7682 | 2019-04-19 | 2019-04-19 13:09:45 | 4 | Bus |
| 7683 | 2019-04-19 | 2019-04-19 13:09:54 | 4 | Bus |
| 7684 | 2019-04-19 | 2019-04-19 13:10:57 | 4 | Bus |
| 7685 | 2019-04-19 | 2019-04-19 13:12:06 | 4 | Bus |
| 7686 | 2019-04-19 | 2019-04-19 13:11:01 | 4 | Bus |
| 7687 | 2019-04-19 | 2019-04-19 13:08:45 | 4 | Bus |
| 7688 | 2019-04-19 | 2019-04-19 13:11:45 | 4 | 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;