View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 7,301–7,325 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 7689 | 2019-04-19 | 2019-04-19 13:11:34 | 4 | Bus |
| 7690 | 2019-04-19 | 2019-04-19 13:12:33 | 4 | Bus |
| 7691 | 2019-04-19 | 2019-04-19 13:09:01 | 4 | Bus |
| 7692 | 2019-04-19 | 2019-04-19 13:12:07 | 4 | Bus |
| 7693 | 2019-04-19 | 2019-04-19 13:09:36 | 4 | Bus |
| 7695 | 2019-04-19 | 2019-04-19 13:12:29 | 4 | Bus |
| 7696 | 2019-04-19 | 2019-04-19 13:10:15 | 4 | Bus |
| 7698 | 2019-04-19 | 2019-04-19 13:11:51 | 4 | Bus |
| 7699 | 2019-04-19 | 2019-04-19 13:09:25 | 4 | Bus |
| 7701 | 2019-04-19 | 2019-04-19 13:09:29 | 4 | Bus |
| 7702 | 2019-04-19 | 2019-04-19 13:13:57 | 4 | Bus |
| 7703 | 2019-04-19 | 2019-04-19 13:13:01 | 4 | Bus |
| 7704 | 2019-04-19 | 2019-04-19 13:13:46 | 4 | Bus |
| 7705 | 2019-04-19 | 2019-04-19 13:10:21 | 4 | Bus |
| 7706 | 2019-04-19 | 2019-04-19 13:11:40 | 4 | Bus |
| 7707 | 2019-04-19 | 2019-04-19 13:13:03 | 4 | Bus |
| 7708 | 2019-04-19 | 2019-04-19 13:11:15 | 4 | Bus |
| 7709 | 2019-04-19 | 2019-04-19 13:10:41 | 4 | Bus |
| 7711 | 2019-04-19 | 2019-04-19 13:10:46 | 4 | Bus |
| 7712 | 2019-02-22 | 2019-02-22 11:19:46 | 4 | Walk |
| 7713 | 2019-03-15 | 2019-03-15 09:09:22 | 5 | Other |
| 7714 | 2019-03-15 | 2019-03-15 09:08:50 | 5 | Other |
| 7715 | 2019-03-15 | 2019-03-15 09:09:31 | 5 | Other |
| 7716 | 2019-03-03 | 2019-03-03 12:39:07 | 1 | Walk |
| 7717 | 2019-03-03 | 2019-03-03 12:38:50 | 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;