View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 4,176–4,200 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 4410 | 2017-08-18 | 2017-08-18 12:18:31 | 2 | Metro |
| 4411 | 2017-08-20 | 2017-08-20 15:02:07 | 2 | Taxi |
| 4412 | 2017-08-20 | 2017-08-20 15:02:28 | 2 | Taxi |
| 4413 | 2017-08-21 | 2017-08-21 10:47:01 | 1 | Bus |
| 4414 | 2017-08-21 | 2017-08-21 10:47:03 | 1 | Bus |
| 4415 | 2017-08-19 | 2017-08-19 14:02:11 | 4 | Walk |
| 4416 | 2017-08-19 | 2017-08-19 14:01:57 | 4 | Walk |
| 4417 | 2017-08-21 | 2017-08-21 10:56:27 | 2 | Metro |
| 4418 | 2017-08-21 | 2017-08-21 10:56:32 | 2 | Metro |
| 4419 | 2017-09-10 | 2017-09-10 12:39:00 | 1 | Bus |
| 4420 | 2017-09-10 | 2017-09-10 12:38:19 | 1 | Bus |
| 4421 | 2017-08-20 | 2017-08-20 12:42:51 | 3 | Metro |
| 4422 | 2017-11-06 | 2017-11-06 13:35:36 | 1 | Bus |
| 4423 | 2017-11-06 | 2017-11-06 13:35:51 | 1 | Bus |
| 4424 | 2017-11-06 | 2017-11-06 13:36:02 | 1 | Bus |
| 4425 | 2017-11-06 | 2017-11-06 13:35:54 | 1 | Bus |
| 4426 | 2017-11-06 | 2017-11-06 13:36:32 | 1 | Bus |
| 4427 | 2017-11-06 | 2017-11-06 13:36:01 | 1 | Bus |
| 4428 | 2017-11-06 | 2017-11-06 13:36:06 | 1 | Bus |
| 4429 | 2017-11-06 | 2017-11-06 13:36:11 | 1 | Bus |
| 4430 | 2017-11-06 | 2017-11-06 13:36:24 | 1 | Bus |
| 4431 | 2017-11-06 | 2017-11-06 13:36:39 | 1 | Bus |
| 4432 | 2017-11-06 | 2017-11-06 13:37:36 | 1 | Bus |
| 4433 | 2017-11-06 | 2017-11-06 13:37:48 | 1 | Bus |
| 4434 | 2017-11-06 | 2017-11-06 13:37:00 | 1 | 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;