View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 4,126–4,150 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 4360 | 2017-08-25 | 2017-08-25 10:17:31 | 1 | Walk |
| 4361 | 2017-08-25 | 2017-08-25 10:17:11 | 1 | Walk |
| 4362 | 2017-08-25 | 2017-08-25 10:17:28 | 1 | Walk |
| 4363 | 2017-08-19 | 2017-08-19 09:28:31 | 1 | Bus |
| 4364 | 2017-08-19 | 2017-08-19 09:28:53 | 1 | Bus |
| 4365 | 2017-09-07 | 2017-09-07 13:12:29 | 1 | Bus |
| 4366 | 2017-09-07 | 2017-09-07 13:12:05 | 1 | Bus |
| 4367 | 2017-08-10 | 2017-08-10 14:53:22 | 1 | Metro |
| 4368 | 2017-08-10 | 2017-08-10 14:53:13 | 1 | Metro |
| 4369 | 2017-08-20 | 2017-08-20 12:21:32 | 2 | Private Vehicle |
| 4370 | 2017-08-20 | 2017-08-20 12:21:17 | 2 | Private Vehicle |
| 4371 | 2017-08-20 | 2017-08-20 12:21:32 | 2 | Private Vehicle |
| 4372 | 2017-08-20 | 2017-08-20 12:20:57 | 2 | Private Vehicle |
| 4373 | 2017-08-20 | 2017-08-20 12:21:21 | 2 | Private Vehicle |
| 4374 | 2017-08-13 | 2017-08-13 11:29:26 | 2 | Metro |
| 4375 | 2017-08-29 | 2017-08-29 11:26:33 | 2 | Walk |
| 4376 | 2017-08-12 | 2017-08-12 11:04:48 | 2 | Metro |
| 4377 | 2017-08-12 | 2017-08-12 11:04:28 | 2 | Metro |
| 4378 | 2017-09-01 | 2017-09-01 15:52:24 | 4 | Metro |
| 4379 | 2017-08-19 | 2017-08-19 12:06:13 | 1 | Other |
| 4380 | 2017-08-19 | 2017-08-19 12:06:29 | 1 | Other |
| 4381 | 2017-08-13 | 2017-08-13 16:47:27 | 1 | Bus |
| 4382 | 2017-08-14 | 2017-08-14 09:26:27 | 1 | Metro |
| 4383 | 2017-08-14 | 2017-08-14 09:26:44 | 1 | Metro |
| 4384 | 2017-08-14 | 2017-08-14 09:24:51 | 1 | Other |
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;