View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,176–8,200 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 8589 | 2019-07-22 | 2019-07-22 13:37:15 | 1 | Taxi |
| 8590 | 2019-08-06 | 2019-08-06 11:59:47 | 5 | Bus |
| 8591 | 2019-08-06 | 2019-08-06 12:00:12 | 5 | Bus |
| 8592 | 2019-08-06 | 2019-08-06 11:59:58 | 5 | Bus |
| 8593 | 2019-08-06 | 2019-08-06 12:00:00 | 5 | Bus |
| 8594 | 2019-08-26 | 2019-08-26 11:52:51 | 5 | Walk |
| 8595 | 2019-07-23 | 2019-07-23 10:55:01 | 2 | Walk |
| 8596 | 2019-07-23 | 2019-07-23 10:55:26 | 2 | Walk |
| 8597 | 2019-07-24 | 2019-07-24 15:40:52 | 2 | Bus |
| 8598 | 2019-08-05 | 2019-08-05 11:13:21 | 1 | Bus |
| 8599 | 2019-10-15 | 2019-10-15 13:41:53 | 1 | Bus |
| 8601 | 2019-10-15 | 2019-10-15 13:41:57 | 1 | Bus |
| 8602 | 2019-10-15 | 2019-10-15 13:42:11 | 1 | Bus |
| 8604 | 2019-10-15 | 2019-10-15 13:42:14 | 1 | Bus |
| 8605 | 2019-10-15 | 2019-10-15 13:42:49 | 1 | Bus |
| 8606 | 2019-10-15 | 2019-10-15 13:42:38 | 1 | Bus |
| 8607 | 2019-10-15 | 2019-10-15 13:42:29 | 1 | Bus |
| 8608 | 2019-10-15 | 2019-10-15 13:42:35 | 1 | Bus |
| 8609 | 2019-10-15 | 2019-10-15 13:43:29 | 1 | Bus |
| 8610 | 2019-10-15 | 2019-10-15 13:42:29 | 1 | Bus |
| 8612 | 2019-10-15 | 2019-10-15 13:44:23 | 1 | Bus |
| 8613 | 2019-10-15 | 2019-10-15 13:43:10 | 1 | Bus |
| 8614 | 2019-10-15 | 2019-10-15 13:42:53 | 1 | Bus |
| 8616 | 2019-10-15 | 2019-10-15 13:42:45 | 1 | Bus |
| 8617 | 2019-10-15 | 2019-10-15 13:43:17 | 1 | 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;