View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,751–8,775 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9189 | 2019-11-09 | 2019-11-09 11:30:50 | 4 | Bus |
| 9190 | 2019-11-09 | 2019-11-09 11:30:43 | 4 | Bus |
| 9191 | 2019-11-09 | 2019-11-09 11:31:05 | 4 | Bus |
| 9192 | 2019-11-09 | 2019-11-09 11:31:15 | 4 | Bus |
| 9193 | 2019-11-09 | 2019-11-09 11:30:40 | 4 | Bus |
| 9194 | 2019-11-09 | 2019-11-09 11:30:45 | 4 | Bus |
| 9195 | 2019-11-09 | 2019-11-09 11:32:18 | 4 | Bus |
| 9196 | 2019-11-09 | 2019-11-09 11:32:31 | 4 | Bus |
| 9197 | 2019-11-09 | 2019-11-09 11:32:31 | 4 | Bus |
| 9198 | 2019-11-09 | 2019-11-09 11:31:05 | 4 | Bus |
| 9199 | 2019-11-09 | 2019-11-09 11:32:25 | 4 | Bus |
| 9200 | 2019-11-09 | 2019-11-09 11:33:39 | 4 | Bus |
| 9201 | 2019-11-09 | 2019-11-09 11:31:03 | 4 | Bus |
| 9202 | 2019-11-09 | 2019-11-09 11:33:49 | 4 | Bus |
| 9203 | 2019-11-09 | 2019-11-09 11:32:08 | 4 | Bus |
| 9204 | 2019-11-09 | 2019-11-09 11:33:55 | 4 | Bus |
| 9205 | 2019-11-09 | 2019-11-09 11:35:10 | 4 | Bus |
| 9206 | 2019-11-09 | 2019-11-09 11:32:51 | 4 | Bus |
| 9207 | 2019-11-09 | 2019-11-09 11:32:13 | 4 | Bus |
| 9208 | 2019-11-09 | 2019-11-09 11:32:19 | 4 | Bus |
| 9209 | 2019-11-09 | 2019-11-09 11:34:55 | 4 | Bus |
| 9210 | 2019-11-09 | 2019-11-09 11:34:41 | 4 | Bus |
| 9211 | 2019-11-09 | 2019-11-09 11:36:13 | 4 | Bus |
| 9212 | 2019-11-09 | 2019-11-09 11:33:11 | 4 | Bus |
| 9213 | 2019-11-09 | 2019-11-09 11:35:14 | 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;