View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,926–8,950 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9370 | 2019-11-07 | 2019-11-07 14:06:24 | 1 | Walk |
| 9371 | 2019-11-08 | 2019-11-08 13:43:56 | 1 | Walk |
| 9372 | 2019-11-08 | 2019-11-08 13:43:34 | 1 | Walk |
| 9373 | 2019-11-08 | 2019-11-08 10:07:29 | 5 | Metro |
| 9374 | 2019-11-08 | 2019-11-08 10:08:06 | 5 | Metro |
| 9375 | 2019-11-28 | 2019-11-28 09:32:58 | 1 | Metro |
| 9376 | 2019-11-28 | 2019-11-28 09:33:10 | 1 | Metro |
| 9377 | 2019-12-27 | 2019-12-27 14:46:04 | 4 | Walk |
| 9378 | 2019-11-08 | 2019-11-08 12:40:22 | 2 | Bus |
| 9379 | 2019-11-15 | 2019-11-15 10:55:35 | 2 | Metro |
| 9380 | 2019-11-15 | 2019-11-15 10:55:11 | 2 | Metro |
| 9381 | 2019-11-28 | 2019-11-28 09:38:41 | 4 | Walk |
| 9382 | 2019-11-14 | 2019-11-14 14:09:41 | 2 | Taxi |
| 9383 | 2019-11-10 | 2019-11-10 10:47:14 | 3 | Bus |
| 9384 | 2019-11-11 | 2019-11-11 09:42:56 | 1 | Train |
| 9385 | 2019-11-11 | 2019-11-11 09:25:57 | 5 | Bus |
| 9386 | 2019-11-11 | 2019-11-11 09:26:20 | 5 | Bus |
| 9387 | 2019-11-11 | 2019-11-11 09:26:17 | 5 | Bus |
| 9388 | 2019-11-11 | 2019-11-11 09:32:43 | 4 | Bus |
| 9389 | 2019-11-11 | 2019-11-11 09:32:31 | 4 | Bus |
| 9390 | 2019-11-11 | 2019-11-11 09:32:20 | 4 | Bus |
| 9391 | 2019-11-11 | 2019-11-11 09:32:16 | 4 | Bus |
| 9392 | 2019-11-11 | 2019-11-11 09:32:09 | 4 | Bus |
| 9393 | 2019-11-13 | 2019-11-13 10:05:31 | 5 | Private Vehicle |
| 9394 | 2019-11-13 | 2019-11-13 10:05:21 | 5 | Private Vehicle |
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;