View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 26–50 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 26 | 2015-04-25 | 2015-04-25 10:46:29 | 4 | Bus |
| 27 | 2015-04-25 | 2015-04-25 10:44:45 | 4 | Bus |
| 28 | 2015-04-25 | 2015-04-25 10:46:29 | 4 | Bus |
| 29 | 2015-04-25 | 2015-04-25 10:47:41 | 4 | Bus |
| 30 | 2015-04-25 | 2015-04-25 10:46:25 | 4 | Bus |
| 31 | 2015-04-25 | 2015-04-25 10:48:05 | 4 | Bus |
| 32 | 2015-04-25 | 2015-04-25 10:49:29 | 4 | Bus |
| 33 | 2015-04-25 | 2015-04-25 10:49:19 | 4 | Bus |
| 34 | 2015-04-25 | 2015-04-25 10:46:05 | 4 | Bus |
| 35 | 2015-04-25 | 2015-04-25 10:48:26 | 4 | Bus |
| 36 | 2015-04-25 | 2015-04-25 10:48:37 | 4 | Bus |
| 37 | 2015-04-25 | 2015-04-25 10:46:23 | 4 | Bus |
| 38 | 2015-04-25 | 2015-04-25 10:48:59 | 4 | Bus |
| 39 | 2015-04-25 | 2015-04-25 10:46:35 | 4 | Bus |
| 40 | 2015-04-25 | 2015-04-25 10:50:25 | 4 | Bus |
| 41 | 2015-04-25 | 2015-04-25 10:50:38 | 4 | Bus |
| 42 | 2015-04-25 | 2015-04-25 10:46:53 | 4 | Bus |
| 43 | 2015-04-25 | 2015-04-25 10:46:24 | 4 | Bus |
| 44 | 2015-04-25 | 2015-04-25 10:51:17 | 4 | Bus |
| 45 | 2015-04-25 | 2015-04-25 10:50:53 | 4 | Bus |
| 46 | 2015-04-25 | 2015-04-25 10:46:01 | 4 | Bus |
| 47 | 2015-04-25 | 2015-04-25 10:50:38 | 4 | Bus |
| 48 | 2015-04-25 | 2015-04-25 10:46:09 | 4 | Bus |
| 49 | 2015-04-25 | 2015-04-25 10:47:35 | 4 | Bus |
| 50 | 2015-04-25 | 2015-04-25 10:48:23 | 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;