View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,801–8,825 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9240 | 2019-10-19 | 2019-10-19 10:40:24 | 3 | Walk |
| 9241 | 2019-12-20 | 2019-12-20 13:54:08 | 4 | Bus |
| 9242 | 2019-12-20 | 2019-12-20 13:54:14 | 4 | Bus |
| 9243 | 2019-12-20 | 2019-12-20 13:54:36 | 4 | Bus |
| 9244 | 2019-12-20 | 2019-12-20 13:54:26 | 4 | Bus |
| 9245 | 2019-12-20 | 2019-12-20 13:54:40 | 4 | Bus |
| 9246 | 2019-12-20 | 2019-12-20 13:55:18 | 4 | Bus |
| 9247 | 2019-12-20 | 2019-12-20 13:55:32 | 4 | Bus |
| 9248 | 2019-12-20 | 2019-12-20 13:55:46 | 4 | Bus |
| 9249 | 2019-12-20 | 2019-12-20 13:54:48 | 4 | Bus |
| 9250 | 2019-12-20 | 2019-12-20 13:55:20 | 4 | Bus |
| 9251 | 2019-12-20 | 2019-12-20 13:55:08 | 4 | Bus |
| 9252 | 2019-12-20 | 2019-12-20 13:55:47 | 4 | Bus |
| 9253 | 2019-12-20 | 2019-12-20 13:55:08 | 4 | Bus |
| 9254 | 2019-12-20 | 2019-12-20 13:56:05 | 4 | Bus |
| 9255 | 2019-12-20 | 2019-12-20 13:56:56 | 4 | Bus |
| 9256 | 2019-12-20 | 2019-12-20 13:57:38 | 4 | Bus |
| 9257 | 2019-12-20 | 2019-12-20 13:57:52 | 4 | Bus |
| 9258 | 2019-12-20 | 2019-12-20 13:56:07 | 4 | Bus |
| 9259 | 2019-12-20 | 2019-12-20 13:55:56 | 4 | Bus |
| 9260 | 2019-12-20 | 2019-12-20 13:56:40 | 4 | Bus |
| 9261 | 2019-12-20 | 2019-12-20 13:58:08 | 4 | Bus |
| 9262 | 2019-12-20 | 2019-12-20 13:57:59 | 4 | Bus |
| 9263 | 2019-12-20 | 2019-12-20 13:55:36 | 4 | Bus |
| 9264 | 2019-12-20 | 2019-12-20 13:55:40 | 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;