View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 4,826–4,850 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5086 | 2018-05-04 | 2018-05-04 12:19:43 | 4 | Bus |
| 5087 | 2018-05-04 | 2018-05-04 12:19:18 | 4 | Bus |
| 5088 | 2018-05-04 | 2018-05-04 12:20:14 | 4 | Bus |
| 5089 | 2018-05-04 | 2018-05-04 12:21:16 | 4 | Bus |
| 5090 | 2018-05-04 | 2018-05-04 12:20:49 | 4 | Bus |
| 5091 | 2018-05-04 | 2018-05-04 12:20:38 | 4 | Bus |
| 5092 | 2018-05-04 | 2018-05-04 12:19:43 | 4 | Bus |
| 5093 | 2018-05-04 | 2018-05-04 12:23:06 | 4 | Bus |
| 5094 | 2018-05-04 | 2018-05-04 12:21:02 | 4 | Bus |
| 5095 | 2018-05-04 | 2018-05-04 12:19:34 | 4 | Bus |
| 5096 | 2018-05-04 | 2018-05-04 12:20:28 | 4 | Bus |
| 5097 | 2018-05-04 | 2018-05-04 12:23:36 | 4 | Bus |
| 5098 | 2018-05-04 | 2018-05-04 12:23:49 | 4 | Bus |
| 5099 | 2018-05-04 | 2018-05-04 12:23:06 | 4 | Bus |
| 5100 | 2018-05-04 | 2018-05-04 12:24:15 | 4 | Bus |
| 5101 | 2018-05-04 | 2018-05-04 12:24:58 | 4 | Bus |
| 5102 | 2018-05-04 | 2018-05-04 12:20:02 | 4 | Bus |
| 5103 | 2018-05-04 | 2018-05-04 12:25:26 | 4 | Bus |
| 5104 | 2018-05-04 | 2018-05-04 12:25:07 | 4 | Bus |
| 5106 | 2018-05-04 | 2018-05-04 12:26:28 | 4 | Bus |
| 5108 | 2018-05-04 | 2018-05-04 12:23:48 | 4 | Bus |
| 5109 | 2018-05-04 | 2018-05-04 12:21:34 | 4 | Bus |
| 5110 | 2018-05-04 | 2018-05-04 12:26:36 | 4 | Bus |
| 5111 | 2018-05-04 | 2018-05-04 12:24:56 | 4 | Bus |
| 5114 | 2018-05-04 | 2018-05-04 12:20:34 | 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;