View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,476–2,500 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 2615 | 2016-08-11 | 2016-08-11 10:59:44 | 1 | Walk |
| 2616 | 2016-08-11 | 2016-08-11 11:17:10 | 1 | Bus |
| 2617 | 2016-08-11 | 2016-08-11 12:01:26 | 2 | Walk |
| 2618 | 2016-08-11 | 2016-08-11 12:02:04 | 2 | Walk |
| 2619 | 2016-08-11 | 2016-08-11 13:29:28 | 1 | Walk |
| 2620 | 2016-08-11 | 2016-08-11 13:29:38 | 1 | Walk |
| 2621 | 2016-08-11 | 2016-08-11 13:30:03 | 1 | Walk |
| 2622 | 2016-08-11 | 2016-08-11 13:29:55 | 1 | Walk |
| 2623 | 2016-08-11 | 2016-08-11 13:29:18 | 1 | Walk |
| 2624 | 2016-08-23 | 2016-08-23 12:53:42 | 1 | Walk |
| 2625 | 2016-08-23 | 2016-08-23 12:54:18 | 1 | Walk |
| 2626 | 2016-08-23 | 2016-08-23 12:53:38 | 1 | Walk |
| 2627 | 2016-08-23 | 2016-08-23 12:53:49 | 1 | Walk |
| 2628 | 2016-08-13 | 2016-08-13 10:06:33 | 2 | Bus |
| 2629 | 2016-08-13 | 2016-08-13 10:13:54 | 1 | Metro |
| 2630 | 2016-08-13 | 2016-08-13 10:13:37 | 1 | Metro |
| 2631 | 2016-08-20 | 2016-08-20 15:22:37 | 1 | Bus |
| 2632 | 2016-08-20 | 2016-08-20 15:22:34 | 1 | Bus |
| 2633 | 2016-08-20 | 2016-08-20 15:23:03 | 1 | Bus |
| 2634 | 2016-08-14 | 2016-08-14 09:01:30 | 1 | Private Vehicle |
| 2635 | 2016-08-14 | 2016-08-14 09:01:43 | 1 | Private Vehicle |
| 2636 | 2016-08-14 | 2016-08-14 09:01:47 | 1 | Private Vehicle |
| 2637 | 2016-08-14 | 2016-08-14 09:01:45 | 1 | Private Vehicle |
| 2638 | 2016-08-14 | 2016-08-14 09:01:54 | 1 | Private Vehicle |
| 2639 | 2016-08-14 | 2016-08-14 11:05:32 | 4 | 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;