View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,776–8,800 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9214 | 2019-11-09 | 2019-11-09 11:36:25 | 4 | Bus |
| 9215 | 2019-11-09 | 2019-11-09 11:33:01 | 4 | Bus |
| 9216 | 2019-11-09 | 2019-11-09 11:36:51 | 4 | Bus |
| 9217 | 2019-11-09 | 2019-11-09 11:37:37 | 4 | Bus |
| 9218 | 2019-11-09 | 2019-11-09 11:38:25 | 4 | Bus |
| 9219 | 2019-11-09 | 2019-11-09 11:36:20 | 4 | Bus |
| 9220 | 2019-11-09 | 2019-11-09 11:32:55 | 4 | Bus |
| 9221 | 2019-11-09 | 2019-11-09 11:36:42 | 4 | Bus |
| 9222 | 2019-11-09 | 2019-11-09 11:38:47 | 4 | Bus |
| 9223 | 2019-11-09 | 2019-11-09 11:39:40 | 4 | Bus |
| 9224 | 2019-11-09 | 2019-11-09 11:37:15 | 4 | Bus |
| 9225 | 2019-11-09 | 2019-11-09 11:36:45 | 4 | Bus |
| 9226 | 2019-11-09 | 2019-11-09 11:36:55 | 4 | Bus |
| 9228 | 2019-10-17 | 2019-10-17 15:25:03 | 4 | Walk |
| 9229 | 2019-10-17 | 2019-10-17 15:25:21 | 4 | Walk |
| 9230 | 2019-10-23 | 2019-10-23 10:56:55 | 2 | Private Vehicle |
| 9231 | 2019-10-23 | 2019-10-23 10:56:46 | 2 | Private Vehicle |
| 9232 | 2019-10-23 | 2019-10-23 10:56:20 | 2 | Private Vehicle |
| 9233 | 2019-10-23 | 2019-10-23 10:56:30 | 2 | Private Vehicle |
| 9234 | 2019-10-18 | 2019-10-18 10:23:15 | 1 | Bus |
| 9235 | 2019-10-18 | 2019-10-18 10:23:02 | 1 | Bus |
| 9236 | 2019-10-26 | 2019-10-26 14:56:28 | 1 | Train |
| 9237 | 2019-10-26 | 2019-10-26 14:56:15 | 1 | Train |
| 9238 | 2019-10-26 | 2019-10-26 14:56:24 | 1 | Train |
| 9239 | 2019-10-19 | 2019-10-19 10:39:48 | 3 | Walk |
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;