View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 7,601–7,625 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 8001 | 2019-05-31 | 2019-05-31 11:55:03 | 1 | Bus |
| 8002 | 2019-05-31 | 2019-05-31 11:55:09 | 1 | Bus |
| 8003 | 2019-05-31 | 2019-05-31 11:55:15 | 1 | Bus |
| 8004 | 2019-05-31 | 2019-05-31 11:55:35 | 1 | Bus |
| 8005 | 2019-05-31 | 2019-05-31 11:56:15 | 1 | Bus |
| 8006 | 2019-05-31 | 2019-05-31 11:55:33 | 1 | Bus |
| 8007 | 2019-05-31 | 2019-05-31 11:56:59 | 1 | Bus |
| 8008 | 2019-05-31 | 2019-05-31 11:57:24 | 1 | Bus |
| 8009 | 2019-05-31 | 2019-05-31 11:57:03 | 1 | Bus |
| 8010 | 2019-05-31 | 2019-05-31 11:56:36 | 1 | Bus |
| 8011 | 2019-05-31 | 2019-05-31 11:57:13 | 1 | Bus |
| 8012 | 2019-05-31 | 2019-05-31 11:57:39 | 1 | Bus |
| 8013 | 2019-05-31 | 2019-05-31 11:57:51 | 1 | Bus |
| 8014 | 2019-05-31 | 2019-05-31 11:56:38 | 1 | Bus |
| 8015 | 2019-05-31 | 2019-05-31 11:56:45 | 1 | Bus |
| 8016 | 2019-05-31 | 2019-05-31 11:57:30 | 1 | Bus |
| 8017 | 2019-05-31 | 2019-05-31 11:58:59 | 1 | Bus |
| 8018 | 2019-05-31 | 2019-05-31 11:58:51 | 1 | Bus |
| 8019 | 2019-05-31 | 2019-05-31 11:59:47 | 1 | Bus |
| 8020 | 2019-05-31 | 2019-05-31 11:58:06 | 1 | Bus |
| 8021 | 2019-05-31 | 2019-05-31 11:59:27 | 1 | Bus |
| 8022 | 2019-05-31 | 2019-05-31 12:00:54 | 1 | Bus |
| 8023 | 2019-05-31 | 2019-05-31 12:00:43 | 1 | Bus |
| 8024 | 2019-05-31 | 2019-05-31 11:56:54 | 1 | Bus |
| 8025 | 2019-05-31 | 2019-05-31 11:56:59 | 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;